S
ssailor
Hi, everybody,
I am rusty with VB. In the following code,
------------------------------------------------------
Dim dbCmd1 As OleDbCommand = New OleDbCommand("UPDATE
tblLogin SET Password = '1'") ' WHERE UserID = 'Admin'")
Dim dbCmd1 As OleDbCommand = New OleDbCommand("SELECT *
FROM tblLogin WHERE UserID = 'Admin'")
'" + g_userID + "'")
dbCmd1.Connection = g_loginConn
dbCmd1.Connection = g_loginConn
#1: dbCmd.ExecuteNonQuery() 'update syntax error
#2: dbCmd.ExecuteNonQuery() 'ok
-------------------------------------------------------------
the statement at line #1 causes a "update syntax error" while
the statement at
line #2 is OK. Does the ExecuteNonQuery() cannot execute the Update
command or
for some other reasons? I am very appreciated if someone give me some
hints.
I am rusty with VB. In the following code,
------------------------------------------------------
Dim dbCmd1 As OleDbCommand = New OleDbCommand("UPDATE
tblLogin SET Password = '1'") ' WHERE UserID = 'Admin'")
Dim dbCmd1 As OleDbCommand = New OleDbCommand("SELECT *
FROM tblLogin WHERE UserID = 'Admin'")
'" + g_userID + "'")
dbCmd1.Connection = g_loginConn
dbCmd1.Connection = g_loginConn
#1: dbCmd.ExecuteNonQuery() 'update syntax error
#2: dbCmd.ExecuteNonQuery() 'ok
-------------------------------------------------------------
the statement at line #1 causes a "update syntax error" while
the statement at
line #2 is OK. Does the ExecuteNonQuery() cannot execute the Update
command or
for some other reasons? I am very appreciated if someone give me some
hints.