ASP error regaurding an sql insert statement

Last Post 28 Sep 2006 01:13 PM by charley.george. 2 Replies.
AddThis - Bookmarking and Sharing Button
Author Messages
charley.george
New Member
New Member

--
28 Sep 2006 05:40 AM
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

[Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near '#ulButtons li a'.

/scripts/dragndrop/templates.asp, line 137

SQL statement
"INSERT INTO FolioPages (Title, Contents, Element) VALUES '" & replace(arrayCss(0, posCss), "1000", ID) & "', '" & replace(arrayCss(1, posCss), "1000", ID) & "', '" & replace(arrayCss(2, posCss), "1000", ID) & "' WHERE Type='css' AND IVID='" & ID & "' AND Page='" & pageArray(position) & "';"

I am not sure why this is occuring. I am trying to transfer template information to another account. All i am doing is in a previous function is get data from the database and dump the record set into an array. I first check the rs for eof the check if the aray is an array then try a select statement for the second element to see if the record exists if not then insert into DB. I am using sql server 2005. I have tried several remedies such as creating a variable and inserting a variable in appropriate values column
charley.george
New Member
New Member

--
28 Sep 2006 01:13 PM
i do not think i could use the suggested sql statement because there are multiple elements to change in different types. I would have to check to see if the exist first that is why I selected the first then dumped into an array I know it is a bit cheep but I do not have loads of time to make it right. I would appreciate a hand in making what I am trying work
thanks a ton for the help
charley.george
New Member
New Member

--
28 Sep 2006 02:18 PM
russellb

Thanks a ton for the dah on myself. I should have seen that it should not use a where clause. Man i am blind. I am the only programmer here.

thanks again


Acceptable Use Policy
---