Replies Back to Article
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
I get the same error, and I've got Access 2000 and I'm using "Jet OLEDB Provider 4.0":
Microsoft JET Database Engine error '80040e14'
Invalid SQL statement; expected 'DELETE', 'INSERT', 'PROCEDURE', 'SELECT', or 'UPDATE'
Is there something I need to tweak in the Access DB before I can retrieve the IDENTITY?
Maybe I'll just try it with SQL 7.0 instead.
After struggling to get this extension to work without success, I finally tried Tom Muck's Insert-RetrieveID extension, part of UltraSuite. It worked like a dream.
According to the documentation, though, Muck's server behavior won't work with SQL Server: it doesn't use @@IDENTITY to retrieve the latest AutoNumber.
With a little tweaking, I was able to get this Microsoft sample to work with Access 2000:
http://support.microsoft.com/support/kb/articles/Q232/1/44.ASP
Could you please let me know what did you do with your code to the connection part? I still get the same error message by trying many ways
Microsoft JET Database Engine error '80040e14'
Syntax error in UPDATE statement.
/Login/PasswordEdit.asp, line 109
Please help, thanks in advance!
Try these 2 things:
1) Comment out the "As" keywords after the variables are dimensioned (Visual Basic uses them; VBScript doesn't).
2) Add an include to adovbs.inc, and make sure you have that file in your site root.
My altered code looks like this (at the top of the page):
<!--#include file="../adovbs.inc"-->
<%
Dim cnDatabase 'As ADODB.Connection
Dim rsNewAutoIncrement 'As ADODB.Recordset
Dim strConn 'As String
Dim strSQL 'As String
Dim strPathToMDB 'As String
...etc.
Hope that helps.
-Paul
I figure out the problem because the Connection only works when using DSNLess Connection
Thank you for your replying
:)
I have downloaded a couple of times the extension "insert with ident" but I always get the following error message:
Server behaviour was not applied. Could not find a valid XML file that refers to teh current server behaviour and the current server model
I am using the Ultradev 4.
Do you have any idea for this fault?
Thank you for your help in advance.
Nicolas
I want to do the same using access 97 or 2000 but getting the same errors as described above - what modifications are needed to the SQL statement to make this work or is there another way of doing this. I have a form which when inserted is inserting aq single row in to the database and am using a uique autonumber field called customerid. I want a confirmatio page to be able to pull the most recently added record using the new record id as a vriable to query the database on the confirmation page. Has anybody got any thoughts on this?
Regards
Chris
I am at my withs end. I keep getting Microsoft OLE DB Provider for ODBC Driverserror '80040e14' , I have reloaded PWS, Windows, Access and dreamweaver a few times to get everything on my machine working again but no joy, I cant seem to see where I am going wrong or what to do. I am using an access 2000 DB whcih I have used lots before with no problem, it is only when I upgraded my extention manager and had to reload my extentions that this seemed to have happened. I am not too tec savy so can you tell me in a simple way as how to get out of this mess.
Regards
Kenny
Hi,
I work with ACCESS 2000 (as I see in the other FAQ)
and I use Microsoft.Jet.OLEDB.4.0 (my connection string is: "Provider=Microsoft.Jet.OLEDB.4.0; Data source="C":\Documents and Settings\Amministratore\Documenti\Siti\mondonovo\mdb-database\mondonovo.mdb" ),
but I have this Error:
Microsoft JET Database Engineerror '80040e14'
Invalid SQL statement; expected 'DELETE', 'INSERT', 'PROCEDURE', 'SELECT', or 'UPDATE'.
Why? Help me please... Is very Important for me...
Thanks...
Simone Berretti
Hi Simone,
Did you ever get a solution to the JET DB error you posted? I'm getting a similar error:
Error Type:
Microsoft JET Database Engine (0x80040E14)
Syntax error in INSERT INTO statement.
/fusion/asp/cust_detail_location_add_1storedcommand.asp, line 16
Line 16 is my command: insertCustomerID.execute()
I'd be interested to here what you found out.
Thanks
Ben : bdykes@es.com
No, i don't find any solution...
and you?
Yes, DWMX had written the SQL statement incorrectly there were two ' ' missing from the code:
insertCustID.CommandText = "INSERT INTO tblCustID (cust) VALUES (" + Replace(insertCustID__varCust, "'", "''") + ")"
Should be:
insertCustID.CommandText = "INSERT INTO tblCustID (cust) VALUES ('" + Replace(insertCustID__varCust, "'", "''") + "')"
The error message can also be shown if the name of one or more fields in the database is a MS Jet reserved word or includes a reserved sign like '-', ie 'ID-person'. A list of reserved words can be found on microsofts webpage, http://support.microsoft.com/default.aspx?scid=kb;EN-US;321266
Best regards,
Johan
Dreamweaver MX, I did also get the js error but got the path fixed but no matter what I did I got error messages and IIS 5 error loading the page.
I use a redirect page that gives me the session NewID then go to the form page and have a hidden field for the NewID to insert into the database using the standard MX insert code..
I used this code http://www.drdev.net/article06.htm and they helped with modification and replaced intNewID = rsNewID(0) with this. Session(“NewID”) = rsNewID(0)