R
Rabbit
I just couldn't figure out this strange behaviour, can anyone tell me why
the following data access code can be executed in Windows form, but it
causes error when using them in Web Form:
Private Sub btn_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btn.Click
Dim Connstr As String =
"Provider=Microsoft.Jet.OLEDB.4.0;Password='';User ID=Admin;Data
Source=C:\Data.mdb"
Dim cn As New OleDbConnection(Connstr)
Dim strSQL As String = "Update tbl_User Set UserPwd = 'test123'"
Dim cmd As OleDbCommand = New OleDbCommand(strSQL, cn)
cn.Open()
Dim intRec As Integer = cmd.ExecuteNonQuery() '<======= this is
the line generating the error msg
Console.WriteLine(intRec)
End Sub
The error message saying "Operation must use an updateable query"
the following data access code can be executed in Windows form, but it
causes error when using them in Web Form:
Private Sub btn_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btn.Click
Dim Connstr As String =
"Provider=Microsoft.Jet.OLEDB.4.0;Password='';User ID=Admin;Data
Source=C:\Data.mdb"
Dim cn As New OleDbConnection(Connstr)
Dim strSQL As String = "Update tbl_User Set UserPwd = 'test123'"
Dim cmd As OleDbCommand = New OleDbCommand(strSQL, cn)
cn.Open()
Dim intRec As Integer = cmd.ExecuteNonQuery() '<======= this is
the line generating the error msg
Console.WriteLine(intRec)
End Sub
The error message saying "Operation must use an updateable query"