PROTECTED]'
Subject: RE: Access AutoiNumber Fields
-Original Message-
From: Miguel [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 03, 2000 11:09 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Access AutoiNumber Fields
Mike
www.ibcmass.com
mailto:[EMAIL PROTECTED]
-Mensaj
You have a couple of options, you could take the item with the highest
autonumber, this can be risky if the site is high traffic. If 50 people
made the same request at the same time its tough to guarentee that you'll
get the right ID.
The method I simply use is selecting that item based on the
Select Max(ID_FIELD_NAME_HERE) AS MAX
FROM Table
Dave
=
"What we need is a list of specific unknown problems we will encounter"
David Hannum
Web Analyst/Programmer
Ohio University
[EMAIL PROTECTED]
(740) 597-2524
- Original Message -
From: "Jonathan
Shame you can't use SQL as you wouldn't have to make 2 hits to the database
then. You could look at the 'Inserted' table after adding the record
-Original Message-
From: Jim Mixon [mailto:[EMAIL PROTECTED]]
Sent: 03 August 2000 15:32
To: [EMAIL PROTECTED]
Subject: Re: Access AutoiNumber
Following Odbc-Access manuals, you should use:
select @@identity
with no table name. this value is the last value of the last modified
recordset on that database.
Mike
www.ibcmass.com
mailto:[EMAIL PROTECTED]
-Mensaje original-
De: Jonathan R. Karlen [mailto:[EMAIL PROTECTED]]
Following Sql-Access manuals, you should use:
select @@identity
with no table name. this value is the last value of the last modified
recordset on that database.
Mike
www.ibcmass.com
mailto:[EMAIL PROTECTED]
-Mensaje original-
De: Jonathan R. Karlen [mailto:[EMAIL PROTECTED]]
]
Subject: Re: Access AutoiNumber Fields
CFTRANSACTION
CFINSERT table="name" DATASOURCE="name"
CFQUERY NAME="name" DATASOURCE="name"
select Max(id) as NewID
from TABLENAME
/CFQUERY
/CFTRANSACTION
New Record ID = name.NewID
How do you get the val
what's the name of the value it returns?
-Original Message-
From: Miguel [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 03, 2000 11:09 AM
To: '[EMAIL PROTECTED]'
Subject: RE: Access AutoiNumber Fields
Following Odbc-Access manuals, you should use:
select @@identity
with no table
I recently used this and it works fine. It is quite simplistic compared to
the Pros but it is in a very lite use application.
cfquery name="CHECKID" datasource="storelist"
SELECT Max(EVENTID)
AS ResultField40
FROM EVENTSRECORD
/cfquery
It is set up as SELECT
day, August 03, 2000 10:32 AM
To: [EMAIL PROTECTED]
Subject: Re: Access AutoiNumber Fields
CFTRANSACTION
CFINSERT table="name" DATASOURCE="name"
CFQUERY NAME="name" DATASOURCE="name"
select Max(id) as NewID
from TABLENAME
/CFQUERY
/CFTRANSACTION
New Rec
10 matches
Mail list logo