navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

Microsoft MVP

 

to Vince

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> to Vince
Page: [1]
 
Guest


 
to Vince - 3/15/2001 23:42:00   
RS.Open tableName, yourAlreadyOpenConnection, adOpenKeySet, adLockOptimistic, adCmdTable
RS.AddNew
RS("field1") = value1
RS("field2") = value2
...
RS("fieldN") = valueN
RS.Update
idOfAddedRecord = RS("nameOfAutonumberField")


....
what goes in ("nameOfAutonumberField"), is that a default name for a just added record?????

Vince from Spain

 

Posts: 658
From: Madrid Spain
Status: offline

 
RE: to Vince - 3/15/2001 13:01:00   
No, this is whatever you have called your autonumber field in your access database. Something like "ID" or "CustomerID" or whatever.

Vince

------------------
Internet Business Solutions S.L.(Spain)


(in reply to Guest)
Guest


 
RE: to Vince - 3/15/2001 13:26:00   
but it didn't print the id at all, let alone the id of just added record.

here is what i did:
....
RS("source") = source
RS("realdatesubmit") = Date
myDate=DateValue(spot_impact_mo & "/" & "1" & "/" & spot_impact_yr)
RS("datesubmit") = myDate
RS.Update

idOfAddedRecord = RS("ID")

Response.Write "<strong>SPOT</strong> -"
Response.Write "ID: " & idOfAddedRecord & "<br>"


(in reply to Guest)
Vince from Spain

 

Posts: 658
From: Madrid Spain
Status: offline

 
RE: to Vince - 3/16/2001 20:20:00   
If you manually examine the database after the insert, is the new record there? Has the ID field got a value in it? I just want to check that the ID field is in fact an "autonumber" field.
I have used this method on a number of occasions. It does work. Trust me

------------------
Internet Business Solutions S.L.(Spain)


(in reply to Guest)
Page:   [1]

All Forums >> Web Development >> ASP and Database >> to Vince
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts