How to copy a record in VB/ADO

How to copy a record in VB/ADO

am 15.10.2007 19:41:57 von Alex Chun

How can I copy a record into a new record, in VB using ADO? The table has
an autonumber ID field, and I need to change one other field (out of about
30) in the new record.

Thanks in advance.

Re: How to copy a record in VB/ADO

am 15.10.2007 22:49:44 von lyle

On Oct 15, 1:41 pm, "Alex Chun" wrote:
> How can I copy a record into a new record, in VB using ADO? The table has
> an autonumber ID field, and I need to change one other field (out of about
> 30) in the new record.

There are many ways to do what you ask. Perhaps, we could suggest the
best one if you told us a little more about why you want to copy the
record, and the circumstances in which it will be done.

Regardless, I am the world's second greatest ADO fan. But I can't
think of any case where I would use ADO to accomplish this task with
an Access/JET|ACE db. DAO is excellent at what it's excellent at. And,
in the opinion of this ADO lover, it's likely to be excellent at the
task you describe.

Re: How to copy a record in VB/ADO

am 15.10.2007 23:04:46 von Rich P

Greetings,

The best usage for ADO is for dealing with external data -- data that
does not reside in the Access mdb. It is possible, however, to use ADO
within the Access mdb project, but that would be a little more work than
using native DAO for manipulating data within the Access mdb.

The big thing with ADO is that it is like a translator system. You can
write Transact sql in ADO (sql for Microsoft Sql Server), or PL sql
(Oracle sql) or Jet sql (sql for Access mdb's) and read the results of
the data pull right into an Access mdb table.

Rich

*** Sent via Developersdex http://www.developersdex.com ***

Re: How to copy a record in VB/ADO

am 16.10.2007 05:25:08 von Tom van Stiphout

On Mon, 15 Oct 2007 10:41:57 -0700, "Alex Chun"
wrote:

You could use an Append query.
-Tom.


>How can I copy a record into a new record, in VB using ADO? The table has
>an autonumber ID field, and I need to change one other field (out of about
>30) in the new record.
>
>Thanks in advance.
>