Hi 

I did a search on MSDN for "sql bind variable". Here is the result page:

http://search.microsoft.com/default.asp?qu=sql+bind+variable&boolean=ALL&nq=
NEW&so=RECCNT&p=1&ig=01&ig=02&ig=03&ig=04&ig=05&ig=06&i=00&i=01&i=02&i=03&i=
04&i=05&i=06&i=07&i=08&i=09&i=10&i=11&i=12&i=13&i=14&i=15&i=16&i=17&i=18&i=1
9&i=20&i=21&i=22&i=23&i=24&i=25&i=26&i=27&i=28&i=29&i=30&i=31&i=32&i=33&i=34
&i=35&i=36&i=37&i=38&i=39&i=40&i=41&i=42&i=43&i=44&i=45&i=46&i=47&i=48&i=49&
i=50&i=51&siteid=us/dev

Looks like some articles might help.

Try also these ones

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ado270/htm/
mdobjparameter.asp

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ado270/htm/
mdmscadoobjmod.asp


Stefan Jahnke
Consultant
BOV Aktiengesellschaft
Voice: +49 201 - 4513-298
Fax: +49 201 - 4513-149
mailto:[EMAIL PROTECTED]

visit our website: http://www.bov.de
subscribe to our newsletter: http://www.bov.de/presse/newsletter.asp

Behalten Sie den Ueberblick - mit dem neuen BasicOverView, unserer
Seminaruebersicht fuer das 2. Halbjahr 2002. Sie haben noch kein Exemplar?
Schreiben Sie eine E-Mail an mailto:[EMAIL PROTECTED] oder rufen Sie uns
an unter 0 18 03 / 73 64 62 73!

Wie Sie wissen, koennen ueber das Internet versandte E-Mails leicht unter
fremden Namen  erstellt oder manipuliert werden. Aus diesem Grunde bitten
wir um Verstaendnis dafuer, dass  wir zu Ihrem und unserem Schutz die
rechtliche Verbindlichkeit der vorstehenden Erklaerungen und Aeusserungen
ausschliessen.

As you are probably aware, e-mails sent via the Internet can easily be
copied or manipulated by third parties. For this reason we would ask for
your understanding that, for your own protection and ours, we must decline
all legal responsibility for the validity of the statements and comments
given above.


-----Ursprüngliche Nachricht-----
Von: Miller, Jay [mailto:[EMAIL PROTECTED]]
Gesendet: Mittwoch, 17. Juli 2002 00:08
An: Multiple recipients of list ORACLE-L
Betreff: RE: How to change VB code to use bind variables?


Hi Jared,

Thanks for the suggestion.  But I went to www.microsoft.com, clicked on
support and searched on the words
bind variables oracle visual basic

After a dozen Internet Explorer Script errors I got a bunch of links with
names like 26jbkjakjbmon

That one led to a blank page.  Others led to articles that didn't even
mention bind variables.  And I thought Metalink was bad.

Does anyone have a link that goes directly to an article?

Thanks,
Jay Miller

-----Original Message-----
Sent: Tuesday, July 16, 2002 4:45 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]


Check on the MS support site.  There are several
articles detailing how to do this.

Jared





"Miller, Jay" <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED]
07/16/2002 02:08 PM
Please respond to ORACLE-L

 
        To:     Multiple recipients of list ORACLE-L <[EMAIL PROTECTED]>
        cc: 
        Subject:        How to change VB code to use bind variables?


Hi,

In checking my v$SQLArea I recently discovered that there was an often
executed SQL statement that was not using bind variables.  I tracked it 
down
to a VB front end and asked the development group to modify the code. They
asked me how to do it.

Not being a VB programmer I said I had no idea but would try to find out.
Here's an abbreviated version of the code.  It's the sAcctId that seems to
be causing the multiple executions.  Anyone know how this can be rewritten
to use bind variables?  Can it be done from VB or do we need to transfer 
the
code to PL/SQL on the back end?

Private Function GetSQL(ByVal sKey As String, _
                        ByVal sAcctId As String, _
                        Optional ByVal sAcctNum As String, _
                        Optional ByVal sWhereAnd As String)
Dim sConnect As String
Dim sSql As String
Dim oWsiLibData As WSILib.CDisplayData
Dim rsCustomer As ADODB.Recordset
Dim lCustId As Long
Dim sCustId As String

Select Case sKey
.......
.......
Case "accountinfo":
                 sSql = "SELECT a.id, a.account_no, a.type, a.title1, 
a.title2,
a.title3, " & _
                    "a.inventory_date date_opened, a.last_modified_date
last_change, " & _
                    "rc.description rebatecmsn, " & _
            sSql = sSql & " account_info.fetch_email(" & sAcctId & ") 
email
"
            sSql = sSql & "FROM account a, status s, usa_wh_tax u, fund f, 
"
& _
                    "stock_commission_codes sc, cmsn_rebate_codes rc,
account_kind ak "
            sSql = sSql & ", dual " 
            sSql = sSql & "WHERE a.status_id=s.id and
a.usa_tax_code=u.code(+) " & _
                    "and a.fund_id=f.id and " & _
                    "a.s_stk_cmsn_code=sc.code(+) and
a.cmsn_reb_code=rc.code(+) and a.kind_id=ak.id " & _
                    "and a.id =" & sAcctId

            sConnect = sConnectWSI

            GetSQL = Array(sConnect, sSql)
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Miller, Jay
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Miller, Jay
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).


 
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Stefan Jahnke
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).

Reply via email to