View Full Version : searching a whole database
02-24-2006, 09: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, 07:08 AM
.... anyone? :cool:
02-25-2006, 11: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-26-2006, 12:59 AM
im not that pro of a coder lol.. :( thanks anyways
02-26-2006, 01:04 AM
You can also get a list of tables in the DB by using the system tables.
03-07-2006, 03: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 © 2016 vBulletin Solutions, Inc. All rights reserved.