Hi all. I am using Access DB and trying to execute Delete query but its giving me an error. Below is the code... It execute the Select query perfect but not delete query ================================================== Dim Rdr As OleDbDataReader strSQL =
"Delete From tblAppUsers Where userName='" & user & "'" Dim dbConn As OleDb.OleDbConnection = newDbConnection() Dim Cmd As New OleDbCommand(strSQL, dbConn) dbConn.Open() Rdr = Cmd.ExecuteReader() ================================================== here is an
error description. -------------------------------------------------------------------------------- Could not delete from specified tables. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack
trace for more information about the error and where it originated in the code. Exception Details: System.Data.OleDb.OleDbException: Could not delete from specified tables. Source Error: Line 126: dbConn.Open() Line 127: Line 128: Rdr = Cmd.ExecuteReader()
Line 129: End Sub Source File: C:\Inetpub\wwwroot\WebFFUK\Users\ManagePermission.aspx.vb Line: 128
I have used this method now to execute delete query but still giving me an error Dim user As String = item Dim strSQL As String strSQL = "Delete From tblAppUsers Where userName='" & user & "'" Dim dbConn As OleDb.OleDbConnection = newDbConnection() Dim Cmd
As New OleDbCommand(strSQL, dbConn) dbConn.Open() Cmd.ExecuteNonQuery() dbConn.Close() ================== here is an error details. Server Error in '/WebFFUK' Application. -------------------------------------------------------------------------------- Could
not delete from specified tables. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.OleDb.OleDbException:
Could not delete from specified tables. Source Error: Line 126: dbConn.Open() Line 127: Line 128: Cmd.ExecuteNonQuery() Line 129: Line 130: dbConn.Close() Source File: C:\Inetpub\wwwroot\WebFFUK\Users\ManagePermission.aspx.vb Line: 128
Kash
Member
470 Points
107 Posts
Delete me
Mar 04, 2004 09:08 AM|LINK
ndinakar
All-Star
49092 Points
6868 Posts
Moderator
MVP
Re: Delete me
Mar 04, 2004 05:35 PM|LINK
Dinakar Nethi
Life is short. Enjoy it.
***********************
Kash
Member
470 Points
107 Posts
Re: Delete me
Mar 05, 2004 08:46 AM|LINK
ndinakar
All-Star
49092 Points
6868 Posts
Moderator
MVP
Re: Delete me
Mar 05, 2004 03:27 PM|LINK
Dinakar Nethi
Life is short. Enjoy it.
***********************