If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > Using a int var in sql statement

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-04-03, 00:43
fretel fretel is offline
Registered User
 
Join Date: Feb 2003
Posts: 5
Unhappy Using a int var in sql statement

This is what i have and i keep getting a type mismatch error
obviously im doin it wrong.. all i wanna do is print out the first 6 topic names.

DO UNTIL x=6
strSQL = "SELECT * FROM Topic_Questions " _
& "WHERE Topic_Number='" & Replace(x, "'", "''") & "';"
Set objRS = objConn.Execute(strSQL)
response.write(objRS("Topic_Title"))
x++
LOOP


THANKS FOR ANY HELP
Reply With Quote
  #2 (permalink)  
Old 02-04-03, 01:25
fretel fretel is offline
Registered User
 
Join Date: Feb 2003
Posts: 5
Angry Re: Using a int var in sql statement

TIS OK ive got it now

dont need the ' 'after the = in the strSQL.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

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