Re: One SQL, two conns

From: Manohar Kamath [MVP] (mkamath_at_TAKETHISOUTkamath.com)
Date: 08/29/04


Date: Sun, 29 Aug 2004 09:15:42 -0500

Stuart,

A good practice is to connect to only one database, and take advantage of
connection pooling. You can create views in your product table, to the
tables within cart database. This way, you can just connect to one database.

-- 
Manohar Kamath
Editor, .netWire
www.dotnetwire.com
"Stuart Palmer" <stuartglenpalmer@ntlworld.com> wrote in message
news:_leYc.9$fU3.6@newsfe6-win.ntli.net...
> 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
>
>


Relevant Pages

  • Re: eCommerce/Shopping Cart Experience
    ... I will be open sourcing my shopping cart within the 3 months. ... There will be a customer database included ... ... Session is fine, but in my experiences, ... for the most part, those that disable cookies, also disable session cookies ...
    (microsoft.public.inetserver.asp.db)
  • Re: Finally which ORM tool?
    ... If you've got two objects in memory which are theoretically the same ... database entity - having come from the same database within the same ... A Cart is loaded into memory ... Each entry accesses their cart to get the current currency ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Eof not working correctly
    ... > database"); ... Where are the variables $UserName and $cart being set? ... When you assign a string to a varible you don't need the parenthesis "( ... See my above comments on assigning strings to the $query varible. ...
    (php.general)
  • Re: One SQL, two conns
    ... >I have 2 db's, one is products, one is cart contents. ... >When I display the basket, I want to display the products name from the ... >I have been informed I can do this with SQL some how, ...
    (microsoft.public.inetserver.asp.general)
  • Re: connection based temp tables
    ... You'll have a tricky time with this approach to shopping carts I think. ... Whilst you can create a temp table that persists for only as long as the ... connection to database exists - you'd have to keep the database connected to ... something into the cart, or to pull up the cart items. ...
    (comp.databases.ms-sqlserver)