PC Review


Reply
Thread Tools Rate Thread

Best Practice ADO

 
 
Pat Garard
Guest
Posts: n/a
 
      2nd Jun 2007
G'Day All,

I want to create a New record using ADO (with which I do not have a
great deal of experience).

One of the fields ("ItemUniqueID") is an AutoNumber field, and I would
like to determine its value as early as possible.

Are there any pros/cons relating to:
1. rs.AddNew
intNewID=rs("ItemUniqueID")
rs.("ItemDescription")="Whatever"
:
:
rs.Update

2. rs.AddNew
rs.("ItemDescription")="Whatever"
:
:
intNewID=rs("ItemUniqueID")
rs.Update OR

3. rs.AddNew
rs.("ItemDescription")="Whatever"
:
:
rs.Update
intNewID=rs("ItemUniqueID")

ALSO

If the new Record is to be a duplicate (apart from the AutoNumber), is
there a "smart" way to assign a "block" of values at once, or do I need to
cycle through all the fields as above.
--
Regards,
Pat Garard
Melbourne, Australia
_______________________


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Best practice =?Utf-8?B?RGlmZmlkZW50?= Microsoft ASP .NET 1 27th Feb 2006 06:50 PM
Best Practice Ardus Petus Microsoft Excel Programming 7 20th Feb 2006 03:14 AM
Best Practice =?Utf-8?B?UGhpbA==?= Microsoft Dot NET Framework 1 4th Nov 2004 03:13 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:39 AM.