asp search scripts for access database
#1
Scooby Regular
Thread Starter
Join Date: Dec 2003
Location: Sunderland
Posts: 2,446
Likes: 0
Received 0 Likes
on
0 Posts
asp search scripts for access database
Im in the middle of making a basic website, i want to have a search feature which will search a access database.
problem is im having trouble with the ASP code. Iv tried searching google for examples which i can use to try and help me but most of them are far to complex for what i require and all the other sites you need to pay
So does anyone have any examples of basic ASP scripts that will search a DB which i could look at or any links to sites where i will actually find something of help.
any help would be much appreciated
Thanks in advance SDW
problem is im having trouble with the ASP code. Iv tried searching google for examples which i can use to try and help me but most of them are far to complex for what i require and all the other sites you need to pay
So does anyone have any examples of basic ASP scripts that will search a DB which i could look at or any links to sites where i will actually find something of help.
any help would be much appreciated
Thanks in advance SDW
#2
Scooby Regular
Join Date: Jul 2000
Location: Islington
Posts: 2,145
Likes: 0
Received 0 Likes
on
0 Posts
15seconds.com always used to be an asp script site. i used it alot.
this is the sort of thing you need. sorry it's off the top of my head, but you get the gist
loop the systemtables table and for each one, loop through the table's rows and columns looking for your string
recordset1.open "select table names from sys.tables"
while not recordset1.eof
recordset2.open select * from " & recordset.fields(0)
while not recordset2.eof
for ix=0 to recordset.fields.count-1
if instr(lcase(what_im_looking_for),lcase(recordset2. fields(ix))>0 then
'found a string
endif
next
recordset2.movenext
wend
set recordset2=nothing
recordset1.movenext
wend
set recordset1=nothing
this is the sort of thing you need. sorry it's off the top of my head, but you get the gist
loop the systemtables table and for each one, loop through the table's rows and columns looking for your string
recordset1.open "select table names from sys.tables"
while not recordset1.eof
recordset2.open select * from " & recordset.fields(0)
while not recordset2.eof
for ix=0 to recordset.fields.count-1
if instr(lcase(what_im_looking_for),lcase(recordset2. fields(ix))>0 then
'found a string
endif
next
recordset2.movenext
wend
set recordset2=nothing
recordset1.movenext
wend
set recordset1=nothing
Thread
Thread Starter
Forum
Replies
Last Post