Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 28th, 2004, 01:30 PM
Registered User
 
Join Date: May 2004
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Ei0nN
Default ASP - Selecting Multiple Records

Hey, I have been trying to figure this out for about a day now. And to let you know, I've already googled it. So this is what I'm trying to do...

I have been trying to Select a certain amount of data from my Database.. but I want it to expand the search for my record rather than narrow it..

For Example.....
rs.open "SELECT * from users WHERE toid="&currentID&" and fromid="&CurrentID,Db1,3,3

This narrows the search so that it only selects the records that have toid and fromid = Currentid. This is the problem. I want it to select all the records that have fromid = currentid, and select all the records that have toid = Currentid.

Any Ideas? I'm fresh out. TIA

-Ei0nN
Reply With Quote
  #2 (permalink)  
Old May 28th, 2004, 01:39 PM
Friend of Wrox
 
Join Date: Jun 2003
Location: Bangalore, KA, India.
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

You got to make a big big change in your select statement.;)

Use this...

rs.open "SELECT * from users WHERE toid=" & currentID & " or fromid=" & CurrentID, Db1, 3, 3

Cheers!

_________________________
-Vijay G
Strive for Perfection
Reply With Quote
  #3 (permalink)  
Old May 28th, 2004, 03:38 PM
Registered User
 
Join Date: May 2004
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Ei0nN
Default

Haha! That was fun to ponder for the past day.:D Works like a charm. Thanks gv.
Later

-Ei0nN
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 Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Selecting records in a query firefighter2045 Access VBA 5 August 28th, 2008 08:14 AM
Update records with multiple keys (ASP VBScript) rbrynest SQL Server ASP 4 April 27th, 2005 05:28 AM
Update records with multiple keys (ASP VBScript) rbrynest Dreamweaver (all versions) 1 April 27th, 2005 05:11 AM
selecting records from multiple tables cygnusx04 Classic ASP Databases 1 October 28th, 2004 05:36 AM
selecting multiple records as one record array Greywacke Classic ASP Databases 1 February 10th, 2004 10:33 AM



All times are GMT -4. The time now is 05:15 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.