Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Identity columns and ADO

2 posts in ,  InternetConnectivity - ODBC Windows NT Last posting was on 1999-12-27 19:42:25.0Z
Rich M Posted on 1999-12-21 14:07:28.0Z
From: "Rich M" <rmorrison@greystone.com>
Subject: Identity columns and ADO
Date: Tue, 21 Dec 1999 09:07:28 -0500
Lines: 22
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
Message-ID: <Pvc3Z07S$GA.164@forums.sybase.com>
Newsgroups: sybase.public.connectivity.odbc,sybase.public.sqlserver.internet,sybase.public.sqlserver.nt
NNTP-Posting-Host: gatekeeper.greystone.com 4.17.182.2
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.connectivity.odbc:1717 sybase.public.sqlserver.internet:135 sybase.public.sqlserver.nt:143
Article PK: 114676

I'm using Sybase 11 with the ODBC driver 10.0.3T.4

I'm using ado an cannot get the new identitiy value. My code looks something
like this...

myADORecordset.Update 'does an insert...

Set myNewIdentityrecordset = New ADODB.Recordset

'try and get the new identity...
myNewIdentityrecordset.Open "select @@identity", moSecurity.Connection,
adOpenStatic, adLockPessimistic

I do get a recordset back with 1 field but it is zero...

Thanks
Rich M


Rich M Posted on 1999-12-27 19:42:25.0Z
From: "Rich M" <rmorrison@greystone.com>
References: <Pvc3Z07S$GA.164@forums.sybase.com>
Subject: To answer my own question...
Date: Mon, 27 Dec 1999 14:42:25 -0500
Lines: 34
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
Message-ID: <5TVVwLKU$GA.172@forums.sybase.com>
Newsgroups: sybase.public.connectivity.odbc,sybase.public.sqlserver.internet,sybase.public.sqlserver.nt
NNTP-Posting-Host: gatekeeper.greystone.com 4.17.182.2
Path: forums-1-dub!forums-master.sybase.com!forums.sybase.com
Xref: forums-1-dub sybase.public.connectivity.odbc:1709 sybase.public.sqlserver.internet:134 sybase.public.sqlserver.nt:142
Article PK: 114668

I finally posted the question on an MS newsgroup and got a response
quickly...

On the ODBC Configuration for your Sybase ODBC Driver go to the
Performance Tab and set the value for "Select Method" to "0-Cursor".

Rich M <rmorrison@greystone.com> wrote in message
news:Pvc3Z07S$GA.164@forums.sybase.com...
> I'm using Sybase 11 with the ODBC driver 10.0.3T.4
>
> I'm using ado an cannot get the new identitiy value. My code looks
something
> like this...
>
> myADORecordset.Update 'does an insert...
>
> Set myNewIdentityrecordset = New ADODB.Recordset
>
> 'try and get the new identity...
> myNewIdentityrecordset.Open "select @@identity",
moSecurity.Connection,
> adOpenStatic, adLockPessimistic
>
> I do get a recordset back with 1 field but it is zero...
>
> Thanks
> Rich M
>
>
>
>
>