Insert command
Hello,
I am new to asp.net and i want to insert a record into my table. For that i coded as...
dim connstr as string,conn as oledbconnection,dbcommand as oledbcommand
connstr="provider=Microsoft.Jet.Oledb.4.0;data source=c:\db.mdb"
conn=new oledbconnection(connstr)
insqry="insert into users(userid,username) values('" & txtUID.text & "','" & txtUName.text & "')"
conn.open()
dbcommand=new oledbcommand()
dbcommand.connection=conn
dbcommand.commandType=commandType.text
dbcommand.commandText=insqry
dbcommand.ExecuteNonQuery()
conn.close()
bindDatagrid()
but its not executing well. Displaying error, "Operation must be an updatable query"
I checked the database which readonly attribute unset.
What could be the problem? Otherwise, how can i execute queries like these?
thanx in advance
|