hi,
i'm working in asp.net using visual studio 2005 with vb language,
my tables is access database, will i'm trying to write the delete statement to delete some fields in my tables i wrote this statement and have no errors but the row didn't deleted. here is my code:
[CODE=vbnet]Public Function DeleteQuestion( ByVal Question_ID As Integer)
Dim cmd As New OleDbCommand("D elete from Questions where Question_id= @Question_id)", conn)
Try
conn.Open()
cmd.ExecuteNonQ uery()
Catch ex As Exception
ex.Message.ToSt ring()
End Try
conn.Close()
If er = "" Then
Return "the Question has been Deleted succefully!!!!"
Else
Return er
End If
End Function
End Class[/CODE]
so any one can help or tell me where the problem is or if i miss something here????
i'm working in asp.net using visual studio 2005 with vb language,
my tables is access database, will i'm trying to write the delete statement to delete some fields in my tables i wrote this statement and have no errors but the row didn't deleted. here is my code:
[CODE=vbnet]Public Function DeleteQuestion( ByVal Question_ID As Integer)
Dim cmd As New OleDbCommand("D elete from Questions where Question_id= @Question_id)", conn)
Try
conn.Open()
cmd.ExecuteNonQ uery()
Catch ex As Exception
ex.Message.ToSt ring()
End Try
conn.Close()
If er = "" Then
Return "the Question has been Deleted succefully!!!!"
Else
Return er
End If
End Function
End Class[/CODE]
so any one can help or tell me where the problem is or if i miss something here????
Comment