David wrote:
Line 542 is below.
objconn.Execute(strSQL)
The lines before it simply build an SQL INSERT command. I did a
Response.write to display the SQL and it all looks fine. Anytime I
have had bad SQL it gives me a different error than this one, so it
must be something else.
Just above this I am getting a "next number" using this same
connection and that works fine.
If you want the lines preceding 542 I can send them, but they are very
verbose.
David
No, just show us the result of response.writing your sql statement, ie,
response.write strSQL
Assuming the statement runs correctly when you test it in Query Analyzer
(which should be your first step), and fails to run via ADO, then your
problem is likely related to the use of reserved keywords for names of your
database objects (columns and/or tables). See this for the list of words to
avoid:
http://www.aspfaq.com/show.asp?id=2080
If reserved keywords is not the problem, show us the faining sql statement.
Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.