Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Sudden insert error.

Author  Topic 

cubic
Starting Member

2 Posts

Posted - 2006-02-22 : 14:25:59
I have an asp page that inserts several pieces of input into an SQL database. Page was working fine, and Im not sure what could have changed to cause the following error when data is entered into one of the fields:

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

[Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near 'room'.

/Global.asp, line 20


where global.asp line 20 is
oConn.execute cSql


In this case the text I input was: this room is big

I also tried input of fdsa, and recieved the following error:

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

[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid column name 'fdsa'.

/Global.asp, line 20


More Details:

The field I am inserting this value into is a (nvarcar(1000),null).

None of the other fields on the page have a problem, and this is the last value insert into the database.

Any suggestions or ideas on where I should look to begin solving this issue.

Thanks!


tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2006-02-22 : 14:35:39
Have you tried your inserts in Query Analyzer?

Tara Kizer
aka tduggan
Go to Top of Page

cubic
Starting Member

2 Posts

Posted - 2006-02-22 : 15:19:44
Thanks for the suggestion Tara. I had not. I striped out all the asp and formulated my queries in the analyzer, which helped me identify the problem. I was essentialy missing the single quotes around the input value for that field.
Go to Top of Page
   

- Advertisement -