View Full Version : searching a whole database
02-24-2006, 08:41 AM
hi, i would liek to know if it is possible to search a hole database in asp, every table basically, thanks in advance
02-25-2006, 06:08 AM
.... anyone? :cool:
02-25-2006, 10:32 AM
I don't think you can search for the whole database but you can always search for each table and save the results with arrays.
Dim x, i
i = 0
For x = 1 to NumOfTablesInDatbase
SQL = "SELECT * FROM table" & x & " WHERE (condition)"
While not rs.eof
ArrayName(i) = rs("name")
ArrayId(i) = rs("id")
Array("type") = rs("type")
i = i + 1
02-25-2006, 11:59 PM
im not that pro of a coder lol.. :( thanks anyways
02-26-2006, 12:04 AM
You can also get a list of tables in the DB by using the system tables.
03-07-2006, 02:26 AM
And of course if the fields are structured the same you could put a bunch of SQL statements together with UNION.
And for a related link (although it only uses one table):
Classic ASP Design Tips - Search For Keywords on Multiple Fields
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.