CF Database Question add.

2005-04-19 Thread Ali Awan
I forgot to add that App1 and App2 are inserting to the same table. I ended up with 2 records with the same ID. ~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documentin

CF Database Question add.

2005-04-19 Thread Ali Awan
I forgot to add that App1 and App2 are inserting to the same table. I ended up with 2 records with the same ID. This field is not an Identity Field in the DB because it is alphanumeric. Thanks, Ali ~| Discover CFTicket - The lea

Re: CF Database Question add.

2005-04-19 Thread Thane Sherrington
At 07:45 PM 19/04/2005, Ali Awan wrote: >I forgot to add that App1 and App2 are inserting to the same table. > >I ended up with 2 records with the same ID. Couldn't you use cflock to lock the table until the first app is done? T --- [This E-mail scanned for viruses by Declude Anti-Virus] ~

Re: CF Database Question add.

2005-04-19 Thread Larry White
How are you generating the ID? >I forgot to add that App1 and App2 are inserting to the same table. > >I ended up with 2 records with the same ID. ~| Logware (www.logware.us): a new and convenient web-based time tracking applica

Re: CF Database Question add.

2005-04-20 Thread Ali Awan
I'm not sure but I believe that you can't 's. Ali >At 07:45 PM 19/04/2005, Ali Awan wrote: >>I forgot to add that App1 and App2 are inserting to the same table. >> >>I ended up with 2 records with the same ID. > >Couldn't you use cflock to lock the table until the first app is done? > >T > >---

RE: CF Database Question add.

2005-04-20 Thread Robertson-Ravo, Neil (RX)
Well, you can, there is nothing stopping you ...just not very good practice. -Original Message- From: Ali Awan [mailto:[EMAIL PROTECTED] Sent: 20 April 2005 16:25 To: CF-Talk Subject: Re: CF Database Question add. I'm not sure but I believe that you can't 's. Ali >

Re: CF Database Question add.

2005-04-20 Thread Ali Awan
>How are you generating the ID? > Select Max(ID) as myNewID >From TableA Insert Into TableA (tableAID) Values (#myNewID#) Insert Into TableB (TableBID, columns...) VALUES (#myNewID#, columnValues...) Ali >>I forgot to add that App1 and App2 are inserting to the same table. >> >>I ende

RE: CF Database Question add.

2005-04-20 Thread Ali Awan
just not very good practice. > > >-Original Message- >From: Ali Awan [mailto:[EMAIL PROTECTED] >Sent: 20 April 2005 16:25 >To: CF-Talk >Subject: Re: CF Database Question add. > >I'm not s

Re: CF Database Question add.

2005-04-20 Thread Jochem van Dieten
Ali Awan wrote: > > > Select Max(ID) as myNewID > From TableA > > > > > > Insert Into TableA (tableAID) Values (#myNewID#) > > > > > Insert Into TableB (TableBID, columns...) VALUES (#myNewID#, columnValues...) > If you do all this in a serializable transaction, you should be fine i

Re: CF Database Question add.

2005-04-20 Thread Ali Awan
Thanks to everyone who responded to this thread. Especially Jared and Jochem, I will try out the with a serializable isolation level. I think that will solve the problem. Thanks again, Ali >Ali Awan wrote: > >If you do all this in a serializable transaction, you should be >fine in MS SQL Ser

Re: CF Database Question add.

2005-04-21 Thread Jared Rypka-Hauer - CMG, LLC
No worries, Ali... that's why some of us join these lists. I'm interested to know, though, why you don't have your system either use an internally regulated ID number (like an auto-increment constraint on the column) or use something like a UUID that's generated outside the database... Having to

Re: CF Database Question add.

2005-04-27 Thread Ali Awan
Isn't it though? In an ideal world, I would have all DB access via Stored Procs, to begin with. I'm just working with what I got. > Having to do workarounds like this is kinda scary, eh? > > Laterz! > > J > > On 4/20/05, Ali Awan <[EMAIL PROTECTED]> wrote: > > Thanks to everyone who respond