Hello:

You can bind values using the command object.

Set the command type to text then add your parameters similar to how you would call a stored procedure.

The SQL would looks something like "SELECT NAME FROM EMP WHERE EMPID=:PEMPNO"

Also, if ADO (and ADO.Net) will bind the values for you, this can be seen in your code when monitoring using Quests SQL Monitor. Although it is always better to do it yourself since the execution will be quicker and the values will be bound the first time.




From: [EMAIL PROTECTED]
Reply-To: [EMAIL PROTECTED]
To: Multiple recipients of list ORACLE-L <[EMAIL PROTECTED]>
Subject: RE: Using bind variables with ADO in VB
Date: Fri, 06 Jun 2003 09:04:00 -0800

Yet another reason not to use VB or anything like it.

http://www.amazon.com/exec/obidos/ASIN/020177061X





"Craig Healey" <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED]
 06/06/2003 08:59 AM
 Please respond to ORACLE-L


To: Multiple recipients of list ORACLE-L <[EMAIL PROTECTED]>
cc:
Subject: RE: Using bind variables with ADO in VB



I don't THINK so. To quote further "the parameters are not bound except in the case of stored procedures...In the case of normal SQL, ADO replaces the placeholder with Parameter.Value, so there is no binding on the server side." The way I read that, you can't use bind variables in VB using ADO.

Craig Healey

> -----Original Message-----
> From: Stefan Jahnke [mailto:[EMAIL PROTECTED]
> Sent: 06 June 2003 14:55
> To: Multiple recipients of list ORACLE-L
> Subject: AW: Using bind variables with ADO in VB
>
>
> Hi
>
> Question: Are you sure that the binding you're referring to (your book
> excerpt) doesn't mean "early" bindig versus "late" binding in
> VB using ADO ?
>
> Stefan
>
>
> -----Original Message-----
> Sent: Friday, June 06, 2003 12:35 PM
> To: Multiple recipients of list ORACLE-L
>
>
> Having read that bind variables will solve all our problems ;-) I've
> tried to get the developers to use them. There response being: how? I
> don't know much VB and they don't know what a bind variable is. So I
> read with interest J Prem's question.  Now knowing what to look for, I
> read further, and found that "ADO also does not bind (compile
> to p-code)
> parameterized statements in Oracle" (VB Oracle 8 by Dov Trietsch) 8-(
> Is it true?
> Are bind variables that big a deal in VB code anyway?
> We have a lot of badly written code, so are we better off
> re-writing the
> code without bothering about bind variables at the moment?
> Am I worrying about nothing?
> And no, it doesn't scale particularly well!
>
> Regards
>
> Craig Healey
>


**********************************************************************************


This email and any files transmitted with it are confidential and intended
solely
for the use of the individual or entity to whom they are addressed and may
contain
confidential and/or privileged material.  Any review, retransmission,
dissemination
or other use of, or taking of any action in reliance upon, this
information by
persons or entities other than the intended recipient is prohibited.
Statements
and opinions expressed in this e-mail may not represent those of the
company.

If you have received this email in error please notify
[EMAIL PROTECTED]

This footnote also confirms that this email message has been swept by
MIMEsweeper
for the presence of computer viruses (www.mimesweeper.com)

***********************************************************************************

--
Please see the official ORACLE-L FAQ: http://www.orafaq.net
--
Author: Craig Healey
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
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.net
--
Author:
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
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).

_________________________________________________________________
Help STOP SPAM with the new MSN 8 and get 2 months FREE* http://join.msn.com/?page=features/junkmail


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

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
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