Click to See Complete Forum and Search --> : error ..plz helpOperation must use an updateable quer


unspoken_words2003
October 4th, 2006, 11:54 AM
hello ppl....i am just trying to store data from asp.net webpage into microsof t access...its showin following error...

Operation must use an updateable query.
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: Operation must use an updateable query.

Source Error:


Line 170: cmd.Parameters.Add(New OleDb.OleDbParameter("ne", OleDb.OleDbType.VarChar, 30, "TouristName"))
Line 171: cmd.Parameters("ne").Value = t3.Text
Line 172: cmd.ExecuteNonQuery()
Line 173: OleDbConnection1.Close()
Line 174:

.........................................................................................


my code is like this..

OleDbConnection1.ConnectionString="Provider=""Microsoft.Jet.OLEDB.4.0"";Data Source = """ + Server.MapPath("hotelrecords.mdb") + """"
OleDbConnection1.Open()


Dim cmd As New OleDb.OleDbCommand("insert into table1(TouristName) values (?)", OleDbConnection1)
cmd.Parameters.Add(New OleDb.OleDbParameter("ne", OleDb.OleDbType.VarChar, 30, "TouristName"))
cmd.Parameters("ne").Value = t3.Text
cmd.ExecuteNonQuery()
OleDbConnection1.Close()

mmetzger
October 4th, 2006, 12:01 PM
There are a fair number of reasons this can happen - take a look at http://support.microsoft.com/kb/q175168/ for some more information.

unspoken_words2003
October 4th, 2006, 12:57 PM
what can i do nw...cant get over it...any sols..
regards

SY