GURUS - VB6 - stored procedures
am 11.01.2006 11:55:15 von LarbIssue:
I am trying to convert my old VB / SQL to now use MySQL.
Setup:
I have installed the MySQL ODBC 3.51 driver
Code:
In a very simplistic way
cmd.ActiveConnection = gsDSN
cmd.CommandType = adCmdStoredProc
A. DOESN'T WORK
With cmd
.Parameters(1).Value = sVal1
.Parameters(2).Value = sVal2
.Execute
End With
Now for the life I don't know why this doesn't work
B. DOES work
DIm sQuery as string
sQuery - I build my sql string here
so for example "call sMyProc('param1' , 'param2')
conn.Open gsDSN
conn.execute sQuery
Any ideas
Thankyou
Peter