Re: ADO Autonumber
- From: "Rocky" <darrenrockett@xxxxxxxxxxx>
- Date: Tue, 1 Aug 2006 13:57:02 +0100
Hi Jeff, I tried that this morning and it works, not a perfect solution but
at least I don't have to change the code too much
"Jeff Johnson" <i.get@xxxxxxxxxxx> wrote in message
news:%23edeDpWtGHA.4140@xxxxxxxxxxxxxxxxxxxxxxx
"Rocky" <Rocky@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:02F650BD-572C-4F1E-B369-8C3A6360ACF0@xxxxxxxxxxxxxxxx
I have a program which uses both Access and SQL Server, when I use the
following code it works fine for access, however when it is SQL Server it
does not return a value
If bOpenRecordset("SELECT * FROM [" & fcTableName & "] WHERE Reference
=
" & flReference, tResource, Me, 1, adOpenKeyset, adLockOptimistic) Then
If fnNewRecord Then
tResource.AddNew
lstResource.AddItem txtInput(1) & " : " & txtInput(0)
>> lstResource.ItemData(lstResource.NewIndex) =
tResource("Reference")
Else
Reference is an IDENTITY / AUTONUMBER field, I read the ADO book and it
stated that as long as you used adOpenKeyset, adLockOptimistic it would
work
How about calling the Update function on your recordset first?
.
- Follow-Ups:
- Re: ADO Autonumber
- From: Jeff Johnson
- Re: ADO Autonumber
- References:
- Re: ADO Autonumber
- From: Jeff Johnson
- Re: ADO Autonumber
- Prev by Date: Re: Maximize child form within parent form?
- Next by Date: Re: Sorting a recordset by a sum
- Previous by thread: Re: ADO Autonumber
- Next by thread: Re: ADO Autonumber
- Index(es):