Code Bank
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingCode Bank

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old January 16th, 2005, 06:06 AM
johndunne00 johndunne00 is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Posts: 17 johndunne00 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 54 m 36 sec
Reputation Power: 0
Arrow asp and sql error

hi all this is my 1st post i hope you can help what i am tryin to do is an sql
query rthat searches a data base i am using the folowing code successfully but i wanna change it a tiny bit
strSQL = "SELECT location.* FROM location WHERE (cardid='1')"
i need to change cardid to check against an asp var.. so somethin like strSQL = "SELECT location.* FROM location WHERE (cardid=my_var)"
any ideas help would be appricated
thanks john

Reply With Quote
  #2  
Old January 16th, 2005, 08:54 AM
lewy's Avatar
lewy lewy is offline
Alter Ego Wizard
ASP Free Specialist (4000 - 4499 posts)
 
Join Date: Jun 2004
Location: Edinburg Tx
Posts: 4,381 lewy User rank is General 8th Grade (Above 100000 Reputation Level)lewy User rank is General 8th Grade (Above 100000 Reputation Level)lewy User rank is General 8th Grade (Above 100000 Reputation Level)lewy User rank is General 8th Grade (Above 100000 Reputation Level)lewy User rank is General 8th Grade (Above 100000 Reputation Level)lewy User rank is General 8th Grade (Above 100000 Reputation Level)lewy User rank is General 8th Grade (Above 100000 Reputation Level)lewy User rank is General 8th Grade (Above 100000 Reputation Level)lewy User rank is General 8th Grade (Above 100000 Reputation Level)lewy User rank is General 8th Grade (Above 100000 Reputation Level)lewy User rank is General 8th Grade (Above 100000 Reputation Level)lewy User rank is General 8th Grade (Above 100000 Reputation Level)lewy User rank is General 8th Grade (Above 100000 Reputation Level)lewy User rank is General 8th Grade (Above 100000 Reputation Level)lewy User rank is General 8th Grade (Above 100000 Reputation Level)lewy User rank is General 8th Grade (Above 100000 Reputation Level)  Folding Points: 1009 Folding Title: Novice Folder
Time spent in forums: 1 Month 1 Week 1 Day 22 h 25 m 10 sec
Reputation Power: 1488
This is the first of two other crossposts.
Just because you post a question in different sections of the forum, it's not going to get any attention.

Crossposting is NOT encouraged at this forum.

Too bad I posted an answer to your other crosspost.

Reply With Quote
  #3  
Old January 16th, 2005, 11:22 PM
ksragesh ksragesh is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Location: Chennai
Posts: 2 ksragesh User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Hi John

Try this.

"SELECT location.* FROM location WHERE (cardid=" & my_var & ")"

See if you enclose your asp variable within double quotes it becomes a string rather than an include variable.
So you need to close the double quote before the variable and then concatinate the string with the variable.

regards

Ragesh

Quote:
Originally Posted by johndunne00
hi all this is my 1st post i hope you can help what i am tryin to do is an sql
query rthat searches a data base i am using the folowing code successfully but i wanna change it a tiny bit
strSQL = "SELECT location.* FROM location WHERE (cardid='1')"
i need to change cardid to check against an asp var.. so somethin like strSQL = "SELECT location.* FROM location WHERE (cardid=my_var)"
any ideas help would be appricated
thanks john

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingCode Bank > asp and sql error


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT