You may find that changing your insert statement will help. Change
it to something like:
Sqlstmt = "Insert into Login (UserName, Password) Values('" &
txtUserName.Text & "','" & txtPassword.Text & "')"
Here I am using the column names of where the values should be
inserted into.
A second posibility would be to create a stored procedure for an
inesrt into the table and pass the needed values to the stored
procedure.
--- In AspNetAnyQuestionIsOk%40yahoogroups.com">AspNetAnyQuestionIsOk
yahoogroups.com, captain 009
<captain_16281
...> wrote:
>
> When i run below block of code at ExecutenonQuery the program
gives me error that operation must use updateable query
>
>
> Pl help me out in this matter
>
>
>
>
> Dim Sqlstmt As String
> Dim i As Integer
> Dim objConn As New OleDbConnection
("Provider=Microsoft.Jet.Oledb.4.0;Data Source =
D:KaushalMyFirstDB.mdb")
> Sqlstmt = "Insert into Login Values('" & txtUserName.Text & "','"
& txtPassword.Text & "')"
> Dim objCmd As New OleDbCommand(Sqlstmt, objConn)
> objConn.Open()
> i = objCmd.ExecuteNonQuery()
> objConn.Close()
>
>
>
>
>
> ---------------------------------
> Don't let your dream ride pass you by. Make it a reality with
Yahoo! Autos.
>
> [Non-text portions of this message have been removed]
>
.