|
 |
access_asp thread: Select @@Identity + MS Access 97
Message #1 by "Stephan" <stephan_bussing@h...> on Tue, 23 Jul 2002 15:32:47
|
|
Hi Guys,
can anyone confirm weather the "select @@identity"-statement does not work
on MS Access 97 DB. I tried this, but the newly inserted record returns 0.
I use (nearly) the same source on a MS Access 2000 DB and then the new
identity value is returned. Booth sources work on the same PC with PWS. As
far as I know, the only real difference is MS Access. In booth projects I
use a kind of SP in the DB to insert records. In all the other questions I
read some information about the @@identity option, but the all hava an
Access 2000 DB. So if anyone knows, I'll be glad to hear.
Greetzzz
Stephan
Message #2 by "Ken Schaefer" <ken@a...> on Wed, 24 Jul 2002 12:57:15 +1000
|
|
Please read:
INFO: Jet OLE DB Provider Version 4.0 Supports SELECT @@Identity
http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q232144
Access 97 uses the Jet v3 engine, not the v4 engine.
Cheers
Ken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Stephan" <stephan_bussing@h...>
Subject: [access_asp] Select @@Identity + MS Access 97
: can anyone confirm weather the "select @@identity"-statement does not work
: on MS Access 97 DB. I tried this, but the newly inserted record returns 0.
: I use (nearly) the same source on a MS Access 2000 DB and then the new
: identity value is returned. Booth sources work on the same PC with PWS. As
: far as I know, the only real difference is MS Access. In booth projects I
: use a kind of SP in the DB to insert records. In all the other questions I
: read some information about the @@identity option, but the all hava an
: Access 2000 DB. So if anyone knows, I'll be glad to hear.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Message #3 by "Stephan" <stephan_bussing@h...> on Wed, 24 Jul 2002 09:11:52
|
|
Thx Ken,
I read the article. But it's not quite clear how it works. I use the
following connectionsting:
strPath = "D:\inetpub\selectie\data\selectie.mdb"
ConnectString = ""
& _
"PROVIDER=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & strPath & ";" & _
"User ID=;" & _
"Password=;"
So I'm using v4. But this doesn't work with an access 97 db? I looked on
the MS site, but I can't find any information on v4 in combination with MS
Access 97. So, bases on you information it's not possible?
Thanks
> Please read:
INFO: Jet OLE DB Provider Version 4.0 Supports SELECT @@Identity
http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q232144
Access 97 uses the Jet v3 engine, not the v4 engine.
Cheers
Ken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Stephan" <stephan_bussing@h...>
Subject: [access_asp] Select @@Identity + MS Access 97
: can anyone confirm weather the "select @@identity"-statement does not
work
: on MS Access 97 DB. I tried this, but the newly inserted record returns
0.
: I use (nearly) the same source on a MS Access 2000 DB and then the new
: identity value is returned. Booth sources work on the same PC with PWS.
As
: far as I know, the only real difference is MS Access. In booth projects I
: use a kind of SP in the DB to insert records. In all the other questions
I
: read some information about the @@identity option, but the all hava an
: Access 2000 DB. So if anyone knows, I'll be glad to hear.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Message #4 by "Ken Schaefer" <ken@a...> on Thu, 25 Jul 2002 11:11:50 +1000
|
|
When you do this:
strConnect = _
"Provider=Microsoft.Jet.OLEDB.4.0;..."
I think that means you're using the v4 OLEDB /Provider/. This provider works
with both v4 and v3 Jet databases (for backwards compatability). However,
Access97 internally uses the v3 Jet Engine, which does not support
@@IDENTITY
So even though you're using a newer provider to connect to the database, the
internal database engine is not capable of executing the necessary commands
to return the newly created autonumber value. Instead, you will need to use
a recordset object -or- upgrade to Access2000 (or XP)
Cheers
Ken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Stephan" <stephan_bussing@h...>
Subject: [access_asp] Re: Select @@Identity + MS Access 97
: Thx Ken,
:
: I read the article. But it's not quite clear how it works. I use the
: following connectionsting:
:
: strPath = "D:\inetpub\selectie\data\selectie.mdb"
:
: ConnectString = ""
: & _
: "PROVIDER=Microsoft.Jet.OLEDB.4.0;" & _
: "Data Source=" & strPath & ";" & _
: "User ID=;" & _
: "Password=;"
:
: So I'm using v4. But this doesn't work with an access 97 db? I looked on
: the MS site, but I can't find any information on v4 in combination with MS
: Access 97. So, bases on you information it's not possible?
:
: Thanks
:
: > Please read:
: INFO: Jet OLE DB Provider Version 4.0 Supports SELECT @@Identity
: http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q232144
:
: Access 97 uses the Jet v3 engine, not the v4 engine.
:
: Cheers
: Ken
:
: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: From: "Stephan" <stephan_bussing@h...>
: Subject: [access_asp] Select @@Identity + MS Access 97
:
: : can anyone confirm weather the "select @@identity"-statement does not
: work
: : on MS Access 97 DB. I tried this, but the newly inserted record returns
: 0.
: : I use (nearly) the same source on a MS Access 2000 DB and then the new
: : identity value is returned. Booth sources work on the same PC with PWS.
: As
: : far as I know, the only real difference is MS Access. In booth projects
I
: : use a kind of SP in the DB to insert records. In all the other questions
: I
: : read some information about the @@identity option, but the all hava an
: : Access 2000 DB. So if anyone knows, I'll be glad to hear.
: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:
:
Message #5 by "Stephan" <stephan_bussing@h...> on Thu, 25 Jul 2002 16:36:54
|
|
Thanks Ken, I was just looking for confirmation. You've been very helpfull
as always.
Thanks again.
> When you do this:
strConnect = _
"Provider=Microsoft.Jet.OLEDB.4.0;..."
I think that means you're using the v4 OLEDB /Provider/. This provider
works
with both v4 and v3 Jet databases (for backwards compatability). However,
Access97 internally uses the v3 Jet Engine, which does not support
@@IDENTITY
So even though you're using a newer provider to connect to the database,
the
internal database engine is not capable of executing the necessary commands
to return the newly created autonumber value. Instead, you will need to use
a recordset object -or- upgrade to Access2000 (or XP)
Cheers
Ken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Stephan" <stephan_bussing@h...>
Subject: [access_asp] Re: Select @@Identity + MS Access 97
: Thx Ken,
:
: I read the article. But it's not quite clear how it works. I use the
: following connectionsting:
:
: strPath = "D:\inetpub\selectie\data\selectie.mdb"
:
: ConnectString = ""
: & _
: "PROVIDER=Microsoft.Jet.OLEDB.4.0;" & _
: "Data Source=" & strPath & ";" & _
: "User ID=;" & _
: "Password=;"
:
: So I'm using v4. But this doesn't work with an access 97 db? I looked on
: the MS site, but I can't find any information on v4 in combination with
MS
: Access 97. So, bases on you information it's not possible?
:
: Thanks
:
: > Please read:
: INFO: Jet OLE DB Provider Version 4.0 Supports SELECT @@Identity
: http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q232144
:
: Access 97 uses the Jet v3 engine, not the v4 engine.
:
: Cheers
: Ken
:
: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: From: "Stephan" <stephan_bussing@h...>
: Subject: [access_asp] Select @@Identity + MS Access 97
:
: : can anyone confirm weather the "select @@identity"-statement does not
: work
: : on MS Access 97 DB. I tried this, but the newly inserted record returns
: 0.
: : I use (nearly) the same source on a MS Access 2000 DB and then the new
: : identity value is returned. Booth sources work on the same PC with PWS.
: As
: : far as I know, the only real difference is MS Access. In booth projects
I
: : use a kind of SP in the DB to insert records. In all the other
questions
: I
: : read some information about the @@identity option, but the all hava an
: : Access 2000 DB. So if anyone knows, I'll be glad to hear.
: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:
:
|
|
 |