|
-
Nov 3rd, 2002, 08:10 PM
#1
Thread Starter
Lively Member
*RESOLVED* Getting ID from SQL server
Hi All,
I'm trying to do some CGI and register people by issuing them a booking number (autonumber ID).
When I run the code locally it's fine.
When I rn it on a different PC , the one that actually holds the DB
It tells me : Identity cannot be determined for newly inserted rows.
My code is as following....
gb.Open "Provider=sqloledb;Data Source=" & servername & ";Initial Catalog=" & DatabaseName & ";User id=" & username & ";Password=" & password
visitor.Open "select * from demographics where id<=1", gb, adOpenKeyset, adLockOptimistic
With visitor
.AddNew
!Title = tle
!GivenName = giv
!Surname = sur
!Position = pos
!Organisation = org
!Address1 = add1
!Address2 = add2
!Address3 = add3
!Suburb = UCase(srb)
!State = UCase(ste)
!Pcode = UCase(pcde)
!Country = UCase(cty)
!Phone = ph
!Fax = fx
!Mobile = mb
!Email = eml
.Update
BID = !ID
!Comment = Cmt & !ID
.Update
End With
visitor.Close
gb.Close
Please help, as this is the only thing stopping me from launching my app.
Regards
Chris
Last edited by cboffsite; Nov 4th, 2002 at 03:36 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|