VB6 - Problem passing multiple parameters to Command SQL statement 
Author Message
 VB6 - Problem passing multiple parameters to Command SQL statement

I have a Command object - cmdUpdateData - that I've created in the data
designer in a data environment deMyEnv.  The command contains a SQL
statement with three parameters, and looks like this:

SET Field1 = ?, Field2 = ?
WHERE (Field3 = ?)

Following the rather limited instructions in the MSDN library, I call
deMyEnv.cmdUpdateData from my application.  Intellisense actually prompts me
with deMyEnv.cmdUpdateData(param1, param2, param3).  After substituting
variables for the parameters, however, I get an error:

Compile Error
Expects =.

when I move to a new line.   If I change the query to just  one parameter,
VB doesn't complain.  It seems though that when I have more than one
parameter it doesn't like that.  I did test the query by filling in values
for each parameter in the properties dialog for the Command, and the update
query works fine.

Can anyone shed any light on this - I've tried  about everything and can't
figure it out.  Thanks, Ben.

Fri, 15 Jun 2001 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. How to pass a variable into a SQL Statement Command is Data Environment

2. Parameters from VB6 to ACCESS VBA SQL-statement

3. Passing parameters to a SQL Command in DE.

4. How to pass single, multiple or null parameter value(s) to multiple queries

5. Problem passing parameters to DataReport/command object

6. Problem passing ADO command objects as parameters in MTS

7. Problem passing ADO command objects as parameters in MTS

8. SQL Statement - Too Few Parameters - Integer problem

9. ADO problem with multiple SQL statements using execute method

10. Problems passing a string variable to an SQL statement

11. Problem w/ multiple parameter fields and UNION Sql

12. Problem passing parameters to SQL Server


Powered by phpBB® Forum Software