Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Return error on ASP

Status
Not open for further replies.

sugermama

Technical User
Oct 19, 2001
11
US
First off, I am relatively new at this.

I have built an edit page for a SQL database. I am able to edit the item but when I click on Save Changes I get the following error:

Microsoft OLD DB Provider for ODBC Drivers error '8004e14'

[Microsoft][ODBC SQL Server Driver][SQL Server]Line 4: Incorrect syntax near 's'.

/edit_lesson.asp, line 49

Here is my code from lines 46-49:

strSQLReturn = "Update LESSONS_LEARNED Set DateSubmitted = '" & strDateSubmitted & "', IssueLessonLearned = '" & strIssueLessonLearned & "', Discussion = '" & strDiscussion & "', Recommendation = '" & strRecommendation & "', Division = '" & strDivision & "', SubmittedBy = '" & strSubmittedBy & "', Phone = '" & strPhone & "' where LessonID = '" & intLessonID & "'"

My code works on a test bed but on the live site I receive this error.

Any help you can provide would be greatly appreciated, as I am quite new at this.

Please let me know if further information is required.
 
I don't know if this would help, but you could try putting in brackets after Set and bfore Where clause.
Hope this helps :)
Radhika.
 
I appreciate your quick response.

I tried what you suggested and received a different error so I deleted the brackets and refreshed the browser. Strangely enough, I can edit the record, click on save changes and it goes through without errors. When I try to view it on the results page, the updates do not appear.

Any ideas?

Thank you, once again.
 
Before you send the command to the Connection/Command object, write the strSQLReturn variable to the screen. Then paste this into SQL Query Analyzer and you should be able to soo what is wrong with the statement.
 
Thank you for your help. I was able to get it to work, finally!

I appreciate your time in assisting me with this issue.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top