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:

UPDATE MyTable
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 multi parameters in ado command parameter

2. Problem passing ADO command objects as parameters in MTS

3. Problem passing parameters to DataReport/command object

4. Passing multiple parameters for a parameter using temporary stored procedures

5. Can you pass a where with multiple statements without a variable for each where statement

6. Can parameters be passed to T-SQL command

7. Passing parameters to a SQL Command in DE.

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

9. How to pass parameter to SQL Statement

10. Parameters from VB6 to ACCESS VBA SQL-statement

11. Passing Entire SQL Statement as Parameter

12. SQL:QUERY parameter passing to EXEC statement


 
Powered by phpBB® Forum Software