Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to query for multiple values in a database

Status
Not open for further replies.

SmileeTiger

Programmer
Mar 13, 2000
200
US
I know I can query a DB and get back mulitple values from 1 parameter but how do I get back mulitple values based on multiple parameters. Below is the query I am performing based on 1 parameter VideoID.<br>
<br>
SQLstmt1 = &quot;select Name, Price from VideoCard where VideoID = '&quot; & VideoID <br>
SQLstmt1 = SQLstmt1 & &quot;' order by val (&quot; & VideoID & &quot;)&quot;<br>
Set objRS1 = conn.execute(SQLstmt1)<br>
<br>
How would I change this query to check to see if Memory=Memory?<br>
<br>
Cory<br>

 
Assuming that memory is a string value:<br>
<br>
&quot;select Name, Price from VideoCard where VideoID = '&quot; & VideoID & &quot;' and Memory = '&quot; & memory & &quot;'&quot;<br>
<p>nick bulka<br><a href=mailto:nick@bulka.com>nick@bulka.com</a><br><a href= > </a><br>
 
ok now how would I get the value that it returns?<br>
Can I do something like this?<br>
response.write(objRS1.fields(&quot;Name&quot;))??<br>
<br>
<br>

 
ooh never mind I used <br>
objRS1.MoveFirst<br>
Response.Write objRS1.Fields(0)<br>
<br>
Thanks for your help
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top