Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Search two databases with ASP?

Reply
Thread Tools

Search two databases with ASP?

 
 
Willem
Guest
Posts: n/a
 
      06-28-2005
Hi,

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

Willem


 
Reply With Quote
 
 
 
 
Curt_C [MVP]
Guest
Posts: n/a
 
      06-28-2005
Willem wrote:
> Hi,
>
> I have a newbie question: is it possible to make a search form in asp that
> searches in two different databases (access)?
>
> Willem
>
>


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
blog: http://blog.darkfalz.com
 
Reply With Quote
 
 
 
 
Dave Anderson
Guest
Posts: n/a
 
      06-28-2005
Willem wrote:
> I have a newbie question: is it possible to make a search
> form in asp that searches in two different databases (access)?


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.


 
Reply With Quote
 
Adrienne
Guest
Posts: n/a
 
      06-28-2005
Gazing into my crystal ball I observed "Willem" <(E-Mail Removed)>
writing in news:42c19e7e$0$3904$(E-Mail Removed) .nl:

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


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
Please respond to the group so others can share
 
Reply With Quote
 
Willem
Guest
Posts: n/a
 
      06-29-2005
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" <(E-Mail Removed)> schreef in bericht
news:Xns9683981BF4D17arbpenyahoocom@207.115.63.158 ...
> Gazing into my crystal ball I observed "Willem" <(E-Mail Removed)>
> writing in news:42c19e7e$0$3904$(E-Mail Removed) .nl:
>
>> Hi,
>>
>> I have a newbie question: is it possible to make a search form in asp
>> that searches in two different databases (access)?
>>
>> Willem
>>
>>

>
> 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
> Please respond to the group so others can share



 
Reply With Quote
 
Bullschmidt
Guest
Posts: n/a
 
      06-30-2005
<<
I have a newbie question: is it possible to make a search form in asp
that searches in two different databases (access)?
>>


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...


*** Sent via Developersdex http://www.developersdex.com ***
 
Reply With Quote
 
larrybud2002@yahoo.com
Guest
Posts: n/a
 
      07-08-2005


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



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.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
On DataTable, two databases Steve B. ASP .Net 3 05-14-2007 06:29 PM
merging two Thunderbird databases WCH Firefox 2 04-12-2006 03:03 PM
[podcast] Expert panel discussion of XQuery, native XML databases, SQL/XML databases Ken North XML 0 07-14-2005 05:50 AM
Melding of two databases? Bay0Wulf Computer Support 0 02-04-2004 03:43 AM
Melding of two databases? Bay0Wulf Computer Support 1 02-03-2004 04:56 PM



Advertisments