|
-
Sep 21st, 2006, 05:16 PM
#4
Re: Syntax error converting the varchar value
strSQL = "SELECT "
strSQL &= "SUM(amount) as total "
strSQL &= "FROM "
strSQL &= "SB_data as sb "
strSQL &= "WHERE user_id = '" & drpSalesman.SelectedItem.Value & "' AND datestamp > '" & Now.ToString("d") & "' "
It looks like right here you are passing in a string value into user_id. number values do not require ' ' around them.
put a break on this and check whatis being sent.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|