I have problems with the folowing code, and I don't know what's wrong with it...
If I try to do select statements, it works fine, I can retreive the data, but it does not work for insert...VB Code:
Dim connString As String = "Provider=Microsoft.Jet.OLEDB.4.0;data source=" & Server.MapPath("ProjectDB.mdb") & ";" Dim cn As OleDbConnection cn = New OleDbConnection(connString) cn.Open() Dim sql_ins As String = "INSERT INTO t_user (userid, username, password) VALUES (2, 'test', 'some password');" Dim cmd_ins As OleDbCommand cmd_ins = New OleDbCommand(sql_ins, cn) cmd_ins.ExecuteNonQuery()




Reply With Quote