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
 SQL Server 2000 Forums
 SQL Server Development (2000)
 really weird UPDATE error

Author  Topic 

nabeel
Starting Member

15 Posts

Posted - 2002-04-10 : 15:50:01
Hi,

I'm getting the following for no apparent reason:

UDPATE keywords SET targetID = 0 WHERE targetid = 30

Microsoft OLE DB Provider for SQL Server error '80040e14'

Line 1: Incorrect syntax near '='.

/keywords/incUpdate.asp, line 58


I've print out the query to you can see what is being executed. I use the connection.execute method to run it. The targetID field is an Int field so I'm not using single quotes. I tried that and get the same error.

If I run this on the database or in Query Analyzer it works just fine.

Any ideas? Thanks for taking the time to look...


yakoo
Constraint Violating Yak Guru

312 Posts

Posted - 2002-04-10 : 15:56:23
you have to spell UPDATE correctly

you have UDPATE when it should be UPDATE

Go to Top of Page

nabeel
Starting Member

15 Posts

Posted - 2002-04-10 : 16:05:25
Geez... do I feel like an idiot. You wouldn't believe how much time I spent on that problem, and I have another UPDATE that worked just fine. I couldn't figure it out...

Oh well...

Thanks for catching that...


Go to Top of Page

yakoo
Constraint Violating Yak Guru

312 Posts

Posted - 2002-04-10 : 16:07:25
no problem. I've been in the same situation before.

I think it happens to the best of us. We write our code and there is a small little syntax/mispelled variable somewhere. We keep looking at the code telling ourselves "whats wrong, I know it's right". Sometimes is best to have someone else take a quick look at the code. They usually see the little things.

Got SQL?
Go to Top of Page

nabeel
Starting Member

15 Posts

Posted - 2002-04-11 : 01:21:37
thanks again...
Go to Top of Page
   

- Advertisement -