SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 whats wrong with this?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

kevinxyx
Starting Member

11 Posts

Posted - 08/12/2011 :  11:12:25  Show Profile  Reply with Quote
Unterminated string constant
/payroll/Validation.asp, line 95, column 89
sql = "UPDATE ManHrs SET DaysWork = " & rs5("DaysWork") & ", Record = " & rs5("Record")"'

tkizer
Almighty SQL Goddess

USA
37157 Posts

Posted - 08/12/2011 :  11:45:20  Show Profile  Visit tkizer's Homepage  Reply with Quote
quote:

whats wrong with this?



Well most importantly, your code is vulnerable to SQL injection. You should not be concatenating your SQL queries. Instead use parameterized queries or better yet stored procedures.

To answer your question though, it looks like you don't have the right number of double quotes. For the ending one, you've got a double quote and a single quote. And it appears you need two double quotes instead.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000