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: Help with Visual Basic "INSERT" statement

Re: Help with Visual Basic "INSERT" statement

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Wed, 29 Aug 2001 00:18:06 +0200
Message-ID: <toout26tq2anf1@news.demon.nl>

"Teresa Redmond" <pixelmeow_at_aol.com> wrote in message news:1t1ootsldoa4099nh6nl1qme5cbj1lrnl2_at_4ax.com...
> Hi, all:
>
> I am using Visual Basic 6 to connect to an Oracle 8i database and add
> records. I have a sequence defined, main_pkey, which increments the
> pkey field of the main table. I have this code, using RDO, in VB,
> which updates the table main:
>
> ...
> rs.rdoColumns("pkey").Value = main_pkey.nextval
> rs.rdoColumns("title").Value = Decode(i).First.Title
> rs.rdoColumns("onlink").Value = Decode(i).First.OnLink
> rs.rdoColumns("northbc").Value = Decode(i).First.NorthBC
> ...
>
> Now, as you probably know, that first line doesn't work. Does
> *anyone* here know how I can do this???
>
> Thanks in advance,
>
> --
> Teresa Redmond
> Associate Software Engineer
> Anteon Corporation
> tredmond_at_anteon.com

Put the pkey assignment in a before insert for each row trigger. This group is flooded with examples of that trigger, and examples are also in the Oracle Application Developers Guide.
Please use this group as a *last* resort, not as a *first* resort. I know everyone exposed to Microsux products doesn't read manuals, this won't buy you anything when using Oracle.

Regards,

Sybrand Bakker,
Senior Oracle DBA Received on Tue Aug 28 2001 - 17:18:06 CDT

Original text of this message

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