all groups > inetserver asp general > june 2005 >
You're in the

inetserver asp general

group:

Search two databases with ASP?


Re: Search two databases with ASP? Curt_C [MVP]
6/28/2005 2:30:46 PM
inetserver asp general:
[quoted text, click to view]

Sure, just not with one call or one result set.
You'll have to do them individually then combine.

--
Curt Christianson
site: http://www.darkfalz.com
Re: Search two databases with ASP? Dave Anderson
6/28/2005 2:33:06 PM
[quoted text, click to view]

Of course. You simply perform two searches and aggregate the results.


--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.

Search two databases with ASP? Willem
6/28/2005 9:06:35 PM
Hi,

I have a newbie question: is it possible to make a search form in asp that
searches in two different databases (access)?

Willem

Re: Search two databases with ASP? Adrienne
6/28/2005 9:57:12 PM
Gazing into my crystal ball I observed "Willem" <wvdongen@tiscali.nl>
writing in news:42c19e7e$0$3904$5fc3050@dreader1.news.tiscali.nl:

[quoted text, click to view]

Are you talking about two different databases, or two different tables?

If two databases, see prior responses.

If two tables, then you can do:

sql = "SELECT field FROM table1 WHERE field = '" & keyword & "'"
sql = sql & " UNION "
sql = sql & " SELECT field FROM table2 WHERE field = '" & keyword & "'"

--
Adrienne Boswell
http://www.cavalcade-of-coding.info
Re: Search two databases with ASP? Willem
6/29/2005 12:00:00 AM
Hi Adrienne,

Yes I'am talking about two (or more) whole databases (for combining two
tables I'd rather use a query).
I've read the two prior responses, but they're not very clear to me yet.

Regards,

Willem

"Adrienne" <arbpen2003@sbcglobal.net> schreef in bericht
news:Xns9683981BF4D17arbpenyahoocom@207.115.63.158...
[quoted text, click to view]

Re: Search two databases with ASP? Bullschmidt
6/29/2005 11:18:32 PM
<<
I have a newbie question: is it possible to make a search form in asp
that searches in two different databases (access)?
[quoted text, click to view]

It's a little tricky but it can be done:

http://www.sitepoint.com/forums/showthread.php?t=101500
Forums » Program Your Site » ASP » Populate 1 Array with 2 Queries?

http://www.sitepoint.com/forums/showthread.php?t=178119
Forums » Program Your Site » ASP » linking 2 sep db's

Best regards,
J. Paul Schmidt, Freelance ASP Web Developer
http://www.Bullschmidt.com
ASP Design Tips, ASP Web Database Demo, Free ASP Bar Chart Tool...


Re: Search two databases with ASP? larrybud2002 NO[at]SPAM yahoo.com
7/8/2005 6:51:54 AM


[quoted text, click to view]


If you want to use the sorting abilities in ADO, do a select in each
database, and insert the results into a disconnected recordset. Then
you could do a select on the disconnected recordset for sorting
purposes.

Or just stick the results of each database into an array and sort
manually.
AddThis Social Bookmark Button