Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Ultradev - updating db error 80040e14

Status
Not open for further replies.

needhelpquick

IS-IT--Management
Jan 17, 2001
12
0
0
GB
Can anyone help me please, I can't figure out why I can't update the database.

Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC Microsoft Access Driver] Cannot update '(expression)'; field not updateable.
/edit.asp, line 91

Thanks in advance
Richard
 
Can you post your update command???
Do you have something like:

set dbcon = Server.CreateObject("ADODB.Connection")
dbcon.Open "Database=mydb; DSN=mydb"
UpdateCommand = "UPDATE myTB SET ColName1 = 'a' "_
& "WHERE yourSelection = 'st'"
Set Result = dbcon.Execute(UpdateCommand)

dbcon.Close
Set dbcon= Nothing

'if u have this command "Result.close" before "dbcon.Close"
'u will receive that error. By the way do u have full
'control right on the db? If u don't, u can't update

Hope this helps


GH
 
Could you cover the details of you comment about full control rights on the db. I am having a similiar problem and to test I created a new database, and a new page. The page views and adds information to the database. I can view the information that is in the database but I can not add. I have tried two methods, AddNew and the other Conn.Execute Sql. AddNew method tells me the database or object is locked and Sql method says the database must be an updatable query.

Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Provider = "Microsoft.Jet.OLEDB.4.0"
Conn.Mode = 3
Conn.Open VRoot & "\DBtest\test.mdb"
Sql = "INSERT INTO Events ( IBO ) VALUES ( " & IBO & " ) "
' Sql = "INSERT INTO Events ( IBO, [Date], Time, Where, Host, "
' Sql = Sql & "Speaker, Note, Event_Type, Group_Scope ) "
' Sql = Sql & "VALUES ( " & IBO & ", " & EDate & ", " & ETime & ", "
' Sql = Sql & LOC & ", " & Host & ", " & Speaker & ", " & Note & ", "
' Sql = Sql & ET & ", " & GS & " ) "
Response.write Sql & &quot;<br>&quot; & Chr(13) & Chr(10)
Response.write IBO

Conn.Execute Sql, lngRecs, 1

' Set RS = Server.CreateObject(&quot;ADODB.Recordset&quot;)
' RS.Open &quot;Events&quot;, Conn, 1, 3, 2 'adOpenKeySet, adLockOptimistic, adCmdTable
' RS.AddNew
' RS.Fields(&quot;IBO&quot;) = IBO
' RS.Fields(&quot;Date&quot;) = EDate
' RS.Fields(&quot;Time&quot;) = ETime
' RS.Fields(&quot;Where&quot;) = Where
' RS.Fields(&quot;Host&quot;) = Host
' RS.Fields(&quot;Speaker&quot;) = Speaker
' RS.Fields(&quot;Note&quot;) = Notes
' RS.Fields(&quot;Event_Type&quot;) = ET
' RS.Fields(&quot;Group_Scope&quot;) = GS

' RS.Update
' RS.Close
' Set RS = Nothing
Set Conn = Nothing

Charlie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top