2000 definitely has an autoincrement feature, and would be the simplest and most full proof method.

Robert.

On Tuesday, June 3, 2003, at 04:51 AM, Dan Stein wrote:

MS SQL 2000
--
Dan Stein
Digital Software Solutions
799 Evergreen Circle
Telford PA 18969
Land: 215-799-0192
Mobile: 610-256-2843
Fax 413-410-9682
FMP, WiTango, EDI,SQL 2000
[EMAIL PROTECTED]
www.dss-db.com


From: "Ben Johansen" <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Date: Mon, 2 Jun 2003 21:21:59 -0700
To: <[EMAIL PROTECTED]>
Subject: RE: Witango-Talk: a question


What DB back ends are you referring to?

Ben Johansen - http://www.pcforge.com <http://www.pcforge.com/>
-Authorized WiTango Reseller
 http://www.pcforge.com/WitangoGoodies.htm
-Authorized Alt-N Reseller
 http://www.pcforge.com/AltN.htm


-----Original Message-----
From: Dan Stein [mailto:[EMAIL PROTECTED]
Sent: Monday, June 02, 2003 6:02 PM
To: [EMAIL PROTECTED]
Subject: Re: Witango-Talk: a question

I use the begin and end in the dev studio.
--
Dan Stein
Digital Software Solutions
799 Evergreen Circle
Telford PA 18969
Land: 215-799-0192
Mobile: 610-256-2843
Fax 413-410-9682
FMP, WiTango, EDI,SQL 2000
[EMAIL PROTECTED]
www.dss-db.com


From: "Ben Johansen" <[EMAIL PROTECTED]>
Organization: Intelisoft, Inc.
Reply-To: [EMAIL PROTECTED]
Date: Mon, 2 Jun 2003 17:44:30 -0700
To: <[EMAIL PROTECTED]>
Subject: RE: Witango-Talk: a question


Really, are you using Witango Trans or DB Trans?
it also depends on the DB backend

Ben Johansen - http://www.pcforge.com
Authorized Witango Reseller http://www.pcforge.com/WitangoGoodies.htm
Authorized MDaemon Mail Server Reseller
http://www.pcforge.com/AltN.htm

-----Original Message-----
From: Dan Stein [mailto:[EMAIL PROTECTED]
Sent: Monday, June 02, 2003 5:35 PM
To: [EMAIL PROTECTED]
Subject: Re: Witango-Talk: a question



I avoid the problem by doing a begin transaction and end transaction around the getting of the ID and the insert. This locks the DB for the time it takes to complete this.
--
Dan Stein
Digital Software Solutions
799 Evergreen Circle
Telford PA 18969
Land: 215-799-0192
Mobile: 610-256-2843
Fax 413-410-9682
FMP, WiTango, EDI,SQL 2000
[EMAIL PROTECTED]
www.dss-db.com


From: "Atrix Wolfe" <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Date: Mon, 2 Jun 2003 16:40:06 -0700
To: <[EMAIL PROTECTED]>
Subject: Witango-Talk: a question




hello, weve been having a really hard to track error and i was wondering about something.

We have a table w/ an integer ID that is marked as must be unique.

In our code, we do this to get the next id:

select max(ID)+1 from table

and then in the very next action, its a DBMS using the results of that select to insert into the table.

Well the error we are having is that fairly rarely, the insert DBMS will fail saying rows must be unique (and the ID is the only column marked as needing to be unique).

Could this be due to the multitasking nature of witango where multiple people would hit the select code and get the same ID before it does the insert?

Or does it finish one person's request completely before moving to the next request?

Anyone had any problems like this before or know how to get around it?

Thanks!
Atrix

________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf




________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf

________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf


________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf

________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/maillist.taf




--

Robert Garcia
President - BigHead Technology
CTO - eventpix.com
2781 N Carlmont Pl
Simi Valley, Ca 93065
ph: 805.522.8577 - cell: 805.501.1390
[EMAIL PROTECTED] - [EMAIL PROTECTED]
http://bighead.net/ - http://eventpix.com/ - http://theradmac.com/

Reply via email to