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

Home -> Community -> Usenet -> c.d.o.server -> Re: Using Oracle bind variables on an INSERT

Re: Using Oracle bind variables on an INSERT

From: Mark Freeman <mark_freeman_at_asc.aon.com>
Date: 17 Jun 2003 11:32:21 -0700
Message-ID: <df323d2.0306171032.31080b46@posting.google.com>


I should have been more specific. I am using ADO 2.6. My Oracle driver is SQLORA32.DLL 8.01.75.00 (11/1/2001). The connect string includes "Provider=MSDAORA.1".

"Jim Kennedy" <kennedy-down_with_spammers_at_attbi.com> wrote in message news:<pnwHa.5031$hz1.7734_at_sccrnsc01>...
> Depends upon the driver. In OO4O you define parameters, set them and then
> create your statement once.(reset the values in the parameters, and
> reexecute)
> Jim
>
> --
> Replace part of the email address: kennedy-down_with_spammers_at_attbi.com
> with family. Remove the negative part, keep the minus sign. You can figure
> it out.
> "Mark Freeman" <mark_freeman_at_asc.aon.com> wrote in message
> news:df323d2.0306161811.3c2b4825_at_posting.google.com...
> > I am trying to tune my VB 6 application to take better advantage of
> > the Oracle 8i database it uses.
> >
> > I have the following code:
> >
> > ChangeLog.AddNew
> > ChangeLog("USER_ID") = UserID
> > ChangeLog("Updated") = Now()
> > ChangeLog("EQUIPTYPE_ID") = EquipTypeID
> > ChangeLog("EQUIP_ID") = EquipIDOut
> > ChangeLog("FIELD_NAME") = FieldName
> > ChangeLog("OLD_VALUE") = OldValue
> > ChangeLog("NEW_VALUE") = NewValue
> > ChangeLog.Update
> >
> > This code generates sql_text in v$sqlarea like this:
> >
> > INSERT INTO "TSS_CHANGELOG"
> >
> ("EQUIPTYPE_ID","EQUIP_ID","FIELD_NAME","OLD_VALUE","NEW_VALUE","USER_ID","U
> PDATED")
> > VALUES (1,6111,:V00003,:V00004,:V00005,226,:V00007)
> >
> > Somehow, many of the values are being converted to bind variables
> > without my doing anything. I'd like to take out the middleman and do
> > all of them so I end up with one such query in the cache rather than
> > the thousands that I found. Is this the proper syntax to do what I
> > want:
> >
> > gcnnOut.Execute "INSERT INTO 'TSS_CHANGELOG'
> >
> ('EQUIPTYPE_ID','EQUIP_ID','FIELD_NAME','OLD_VALUE','NEW_VALUE','USER_ID','U
> PDATED')
> > VALUES (:a,:b,:c,:d,:e,:f,:g,:h,:i) using " & EquipTypeID & "," &
> > EquipIDOut & "," & FieldName & "," & OldValue & "," & NewValue & "," &
> > UserID & ",SYSDATE"
> >
> > Thanks for your guidance,
> >
> > - Mark
Received on Tue Jun 17 2003 - 13:32:21 CDT

Original text of this message

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