faqts : Computers : Programming : Languages : Asp : ASP/VBScript : Common Problems : Database and SQL

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

3 of 11 people (27%) answered Yes
Recently 2 of 10 people (20%) answered Yes

Entry

How do I search about 100 tables in the same database AT ONCE looking for a certain record?

May 25th, 2000 21:13
unknown unknown, Rory


Use a join if your database supports it, or make multiple recordsets 
..like:

sql1="select * from db1 where ....."
sql2="select * from db2 where ...."
set RS1=Server.CreateObject("ADODB.Recordset")
set RS2=Server.CreateObject("ADODB.Recordset")
RS1.Open sql1, conn
display results ......

RS2.Open sql2, conn
display results ..

Or put all results into a string or loop..and redo them alphabetically 
.. there are ways but you'll need to know what you're doing and it could 
take some time ..



© 1999-2004 Synop Pty Ltd