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 responded to this
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
Jared,
LOL, yeah it sounds like an Access issue.
Actually we're using SQL 2k.
Another question though, by using a high isolation level will that slow the app
down significantly? I read in the docs that there's a lot of overhead
associated with it?
Thanks,
Ali
Ali,
You'd be best off to use
I'm not sure but I believe that you can't cflock cfquery'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
---
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 cflock cfquery's.
Ali
At 07
How are you generating the ID?
cfquery name=getNewID
Select Max(ID) as myNewID
From TableA
/cfquery
cfset queryname.myNewID = myNewID + 1
cfquery name=AddTableID
Insert Into TableA (tableAID) Values (#myNewID#)
/cfquery
!--- some cf processing ---
cfquery name=AddNewRecord
Insert Into TableB
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 cflock cfquery's.
Ali
Ali Awan wrote:
cfquery name=getNewID
Select Max(ID) as myNewID
From TableA
/cfquery
cfset queryname.myNewID = myNewID + 1
cfquery name=AddTableID
Insert Into TableA (tableAID) Values (#myNewID#)
/cfquery
!--- some cf processing ---
cfquery name=AddNewRecord
Insert Into TableB
Thanks to everyone who responded to this thread.
Especially Jared and Jochem, I will try out the cftransaction 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
Ali,
Wow... ummm... that's a shocker.
As far as isolation levels... umm... which is worse:
A performance Drop
Perpetually Corrupted Data
I have to say that to have the DB set up so that this could happen at
all is a matter of concern for me. It doens't sound like a sound
design. I hope that
I have a question regarding ColdFusion and database requests.
I have 2 applications on different servers, Server A and Server B and they
both access a database on Server C.
The problem is that recently that App1 on Server A and App2 on Server B
ended up hitting the database at the same time.
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
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
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]
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
Ali,
You'd be best off to use a CFTRANSACTION with a high isolation level,
like read_committed or even serializable.
I'm gonna take a stab at this and guess you're using Access?
Keep us posted!
J
On 4/19/05, Ali Awan [EMAIL PROTECTED] wrote:
I have a question regarding ColdFusion and
What is the database? SQL 7, Oracle, Access, ?
-Original Message-
From: Ali Awan
I have a question regarding ColdFusion and database requests.
I have 2 applications on different servers, Server A and Server B and they
both access a database on Server C.
The problem is that
17 matches
Mail list logo