Replies Back to Article

Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

Access 2000 errors
September 3, 2001 by P.R. Newman

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.

RE: Access 2000 errors
September 3, 2001 by P.R. Newman

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

>> Access 2000 errors
November 1, 2001 by charlie charlie

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!

RE: >> Access 2000 errors
November 2, 2001 by P.R. Newman

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

: >> Access 2000 errors
November 2, 2001 by charlie charlie

I figure out the problem because the Connection only works when using DSNLess Connection

Thank you for your replying

:)

Problems with this extension
January 24, 2002 by nicolas diogo

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

Automatically set a session variable with the new record ID
April 9, 2002 by chris cullen

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

Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
April 3, 2003 by Kenny Darcy
Hi Yea,
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
Microsoft JET Database Engine error '80040e14'
October 2, 2003 by Simone Berretti

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

RE: Microsoft JET Database Engine error '80040e14'
December 2, 2003 by ben dykes

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

 

 

RE: RE: Microsoft JET Database Engine error '80040e14'
December 3, 2003 by Simone Berretti

No, i don't find any solution...

and you?

RE: RE: RE: Microsoft JET Database Engine error '80040e14'
December 4, 2003 by ben dykes

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, "'", "''") + "')"

RE: RE: RE: RE: Microsoft JET Database Engine error '80040e14'
December 4, 2003 by Simone Berretti
Thank you very much for the help
Reserved words
March 1, 2004 by Johan Arvidsson

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

Never did get this working.
November 15, 2004 by G Ether

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)