Russia Forums Community


Go Back   Russia.com Discussion Forum > Open Board > Science
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read


Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 30th October 2002, 22:59
BlackJetta BlackJetta is offline
Member
 
Join Date: Oct 2002
Posts: 36
Exclamation

Hi, everybody...
Straight ahead, I'm looking for someone who has an experience with using bind variables with ADO and VB6. I'm trying to pass the list of parameters on the where - in () clause as a string into a bind variable, such as this:

...

objCm.Parameters.Append _
objCm.CreateParameter( "prVar3", adVarChar, adParamInput, 100, "'blah1', 'blah2', 'blah3'" )

strSql = " SELECT * FROM table "
strSql = strSql & " WHERE param in ( : prVar3)"

...

After the execution of the command, the recordset is returned empty.

However, if I run the SQL query directly in TOAD like htis:

SELECT * FROM table
WHERE param in ('blah1', 'blah2', 'blah3')

I have so many records returned.

NOTE: I did test the code with the other cases, such as
using this

objCm.Parameters.Append _
objCm.CreateParameter( "prVar3", adVarChar, adParamInput, 100, "blah1" )

and had the records returned into the recordset.

Any ideas? may be someone had to deal with something like that?

Thanks in advance!!!
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +3. The time now is 22:09.

All Rights Reserved © 1995 - | NewMedia Holdings, Inc. The Russia Channel is operated under license to Paley Media, Inc. which is solely responsible for its content. All trademarks and web sites that appear throughout this site are the property of their respective owners. No part of this site shall be reproduced, copied, or otherwise distributed without the express, written consent of Paley Media, Inc. This site is not affiliated with any government entity associated with a name similar to the site domain name.

Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0 RC4 © 2006, Crawlability, Inc.