Re: SQLCE, DataAdaptors, MultipleTables, Updates and Inserts
From: Jon Skeet [C# MVP] (skeet_at_pobox.com)
Date: 06/21/04
- Next message: Alex Feinman [MVP]: "Re: Connect to Desktop SQL Server 2000 from Pocket PC"
- Previous message: Paul [Paradise Solutions]: "Re: SQLCE, DataAdaptors, MultipleTables, Updates and Inserts"
- In reply to: Paul [Paradise Solutions]: "Re: SQLCE, DataAdaptors, MultipleTables, Updates and Inserts"
- Next in thread: Paul [Paradise Solutions]: "Re: SQLCE, DataAdaptors, MultipleTables, Updates and Inserts"
- Reply: Paul [Paradise Solutions]: "Re: SQLCE, DataAdaptors, MultipleTables, Updates and Inserts"
- Reply: Paul [Paradise Solutions]: "Re: SQLCE, DataAdaptors, MultipleTables, Updates and Inserts"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 21 Jun 2004 17:35:35 +0100
Paul [Paradise Solutions] <Paul@Don'tChuffingSpamMe.com> wrote:
> > Do one update and then the other, within a transaction if you want to.
> >
> > Not sure what you mean by saying that "the first adapter locks the
> > database" - I've never seen that, unless you're trying to use the same
> > connection from two different threads at the same time.
> >
>
> My First reply to this seemed to vanish, so posting again:
>
> How you mean? As in (don't mean to dumb it down - just getting me head
> round it clearly):
>
> Set multitable select query
> Fill tables
> Do table inserts/updates
> Set Insert/Update commands on adapter for table1
> Update
> Set Insert/Update commands on adapter for table2
> Update
Well, I'd suggest:
Set up adapter 1 and commands
Set up adapter 2 and commands
then later:
Fill tables
Modify tables
Open connection
Begin transaction
Set connection and transaction for commands in both adapters
Call update in adapter 1
Call update in adapter 2
Commit transaction
Close connection
-- Jon Skeet - <skeet@pobox.com> http://www.pobox.com/~skeet If replying to the group, please do not mail me too
- Next message: Alex Feinman [MVP]: "Re: Connect to Desktop SQL Server 2000 from Pocket PC"
- Previous message: Paul [Paradise Solutions]: "Re: SQLCE, DataAdaptors, MultipleTables, Updates and Inserts"
- In reply to: Paul [Paradise Solutions]: "Re: SQLCE, DataAdaptors, MultipleTables, Updates and Inserts"
- Next in thread: Paul [Paradise Solutions]: "Re: SQLCE, DataAdaptors, MultipleTables, Updates and Inserts"
- Reply: Paul [Paradise Solutions]: "Re: SQLCE, DataAdaptors, MultipleTables, Updates and Inserts"
- Reply: Paul [Paradise Solutions]: "Re: SQLCE, DataAdaptors, MultipleTables, Updates and Inserts"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|