Incorrect syntax near ')'. - preCharge Forums
It shows that you are unregistered. Please register with us by clicking Here
preCharge Forums


Nav Green LeftNav Right
preCharge Forums > Website Design & Development > Programming > ASP » Incorrect syntax near ')'.


Reply
Tcat Right
 
LinkBack Thread Tools Display Modes Tcat Right
Old 07-07-2006   #1 (permalink)
cade
Junior Member
 
Join Date: Jul 2006
Age: 28
Posts: 5
Default Incorrect syntax near ')'.

this should be easy please help
StrSql = "SELECT * FROM [" & Screen & "] WHERE (CPN="&(COORDID)&") AND (CNUM="&(CNUMQS)&")

Thanks
Cade
cade is offline   Reply With Quote


Old 07-10-2006   #2 (permalink)
Minakshi
Junior Member
 
Join Date: Jul 2006
Age: 39
Posts: 8
Default

Hi,
Pls try this:

StrSql = "SELECT * FROM [" & Screen & "] WHERE (CPN="&(COORDID)&") AND (CNUM="&(CNUMQS)

bec

"SELECT * FROM [" ----- First string
& Screen & -------variable
"] WHERE (CPN=" -------Second string
&(COORDID)& -------variable
") AND (CNUM=" -------Third string
&(CNUMQS) ------last variable ---- (imp *****not a string)
Minakshi is offline   Reply With Quote

Old 07-13-2006   #3 (permalink)
Tom Tom
Junior Member
 
Join Date: Jul 2006
Age: 48
Posts: 25
Default

SELECT * is actually bad practice in real world programming. Best practice is to specify explicity the columns to select.

any way use this if COORDID and CNUMQS are numerical values

StrSql = "SELECT * FROM " & Screen & " WHERE ((CPN="& COORDID &") AND (CNUM="& CNUMQS))

else

StrSql = "SELECT * FROM " & Screen & " WHERE ((CPN= '"& COORDID &"') AND (CNUM='"& CNUMQS&"'"))
Tom Tom is offline   Reply With Quote

Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
sql syntax error tychicus PHP 7 10-12-2006 02:44 AM


footer left
All times are GMT. The time now is 03:42 AM.

DISCLAIMER: preCharge Risk Management is not responsible for any opinions, advice or comments expressed on the preCharge Community Forums.
preCharge® is a registered trademark of preCharge Risk Management | chargeback protection | Merchant Account Blog

Powered by vBulletin
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0 RC6

Hosting | Cell Phones | Credit Reports | Mobile Phones | File Host

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49