Forum Moderators: open

Message Too Old, No Replies

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

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

         

mavrick

12:06 pm on Apr 2, 2004 (gmt 0)

10+ Year Member



hi guys

i am getting this error on this site that i am trying to create.

Error:

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

[Microsoft][ODBC SQL Server Driver][SQL Server]The name 'nish' is not permitted in this context. Only constants, expressions, or variables allowed here. Column names are not permitted

All i am trying to do is add to a sql db.

not sure what to do

thanks

MozMan

4:35 pm on Apr 2, 2004 (gmt 0)

10+ Year Member



Can you post the code where this error is occurring? Most likely it is a syntax error in your SQL...

-Moz

digitalv

6:08 pm on Apr 2, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Check to see if you have have an apostrophe in the string you're trying to insert into the database. If you do, what's happening is that when the string hits SQL it's "closing" the area of the query and then erroring out on the text after it because it doesn't know what to do with it.

Example:

INSERT INTO [People] (Name,Email) VALUES ('Mike O'Nish','mike@onish.com')

Take a look at the example above - SQL is looking at the ' in O'Nish and wants to close the insert of the "name" field. Then it doesn't know what "nish" is and crashes.

An easy fix is to replace ' with double apostrophe ('') not (") and then re-replace it with a single ' when you run your SELECT statements.

If this isn't the problem you're having, post your INSERT statement and I'll take a look.

mavrick

6:01 am on Apr 5, 2004 (gmt 0)

10+ Year Member



thanks guys

the problem was in my insert statment.

thanks again