Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Copying a record

Re: Copying a record

From: AnhMy Tran <anhmytran_at_hotmail.com>
Date: Tue, 04 Apr 2000 13:30:19 GMT
Message-ID: <sejrjbdeeop20@corp.supernews.com>


> Using Oracle 8.x , VB 6.x, and ADO 2.x, what is the best way to copy
> an existing record from a table, change the primary key and insert it?
>
> Basically I have a recordset that I'm using as a template, and the
> only thing that changes is the primary key for the actual instance
> (like copying a employee record).

A Record in a table has a field in the Primary key when the table has. When VB takes a record from a table, it does not take the primary key with the record. It takes only the value in the field.

So there is no primary key change neccessary. That means that it is impossible to insert the duplicate value of the primary key into the table. It does not matter what database, what language, what platform and what service park, it is always impossible, and forever.

--
Posted via CNET Help.com
http://www.help.com/ Received on Tue Apr 04 2000 - 08:30:19 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US