Re: One SQL, two conns

From: Stuart Palmer (stuartglenpalmer_at_ntlworld.com)
Date: 08/29/04


Date: Sun, 29 Aug 2004 15:35:29 GMT

Hi Harag,
    Thx for the info, I know about Joining two tables in a DB together, but
I have two seperate MDB files (Yes, access. I don't have SQL server :o( ).
    Have you opened two SQL Server Db's at the same time and managed to get
data from each? (A kind of JOIN but for mbd queries)

Thx
Stu

"Harag" <haragREMOVETHESECAPITALS@softhome.net> wrote in message
news:g593j0d2jdgsqkasv6tjhoo3ukucl8p78i@4ax.com...
> On Sun, 29 Aug 2004 06:04:42 GMT, "Stuart Palmer"
> <stuartglenpalmer@ntlworld.com> wrote:
>
> >Hi There,
> >I'm writing an ASP cart and hit a problem.
> >
> >I have 2 db's, one is products, one is cart contents.
> >
> >Cart contents holds the unique ID from products when you do your
'basket'.
> >
> >When I display the basket, I want to display the products name from the
> >products DB based on the ID stated in the cart DB
> >
> >I have been informed I can do this with SQL some how, but that means I'd
> >have to create two conn objects? or can it be done another way?
> >
> >Thx for the advise.
> >
> >Stu
> >
>
> 2 DBs or 2 tables in 1 DB ?
> what DB are you using access?
>
> for SQL (as I've never used access) you would join the 2 tables
> together to get the result. since I don't know your Table layouts
> (Provide DDL) I'm just guessing.
>
> SELECT p.ProdID, p.ProdName, b.Quantity, p.Price, (b.Quantity*p.Price)
> as Total
> FROM basket b INNER JOIN
> Products p ON b.ProdID = p.ProdID
> WHERE b.MemberID = 23 -- user number of logged in person.
>
>
> HTH.
>
> Al.
>
>
>



Relevant Pages

  • Re: Using Passthrough Query to Disable Triggers
    ... thx for your post, how do i run this from an MSACCESS pass through query? ... EXECUTE sp_msforeachtable "ALTER TABLE tablename DISABLE TRIGGER ALL" ... PL/SQL: ALTER TABLE tableName DISABLE ALL TRIGGERS; ... I get an "..Invalid SQL statement.." ...
    (microsoft.public.access.queries)
  • Re: Hardware Requirement
    ... SQL may be employ ... Fax Sharing ... What 3rd party apps are going to be installed? ... >> thx. ...
    (microsoft.public.windows.server.sbs)
  • Re: Hardware Requirment
    ... SQL may be employ ... Fax Sharing ... What 3rd party apps are going to be installed? ... >> thx. ...
    (microsoft.public.windows.server.sbs)
  • Re: Hardware Requirement
    ... SQL may be employ ... Fax Sharing ... What 3rd party apps are going to be installed? ... >> thx. ...
    (microsoft.public.windows.server.sbs)
  • Re: Attaching a check box to a max date function
    ... return the records that contain a TRUE ?basket? ... I have included the entire SQL statement for the query in question, ... (Client RIGHT JOIN (Manfacturer RIGHT JOIN ([Generic asset] RIGHT JOIN ...
    (microsoft.public.access.queries)