MySQL Forums
Forum List  »  Connector/ODBC

ADO: Invalid Command Type and Stored Procedure
Posted by: Jonathan ANTHONY
Date: February 22, 2007 11:52AM

Using 5.0 server and odbc driver: MySQL Connector/ODBC v5 5.00.11.00
I have a stored procedure which takes two input parameters:
Parameter object is improperly defined. Inconsistent
CREATE PROCEDURE `add_to_salsa`(
IN psalsaid VARCHAR(30),
IN psalsaname VARCHAR(100)
)

Using the active ADO, I have the following VB script:
OpenDatabase( ConnectStr, cn )
Set cmd = CreateObject("ADODB.Command")
Set cmd.ActiveConnection = cn

cmd.CommandType = adCmdStoredProc
cmd.CommandText = "add_to_salsa"

cmd.Parameters.Append cmd.CreateParameter("Param1", adVarChar, adParamInput, 30)
cmd.Parameters("Param1") = "APP0100"
cmd.Parameters.Append cmd.CreateParameter("Param2", adVarChar, adParamInput, 100)
cmd.Parameters("Param2") = "New0100"
cmd.Execute

The mysql database opens ok because I can send a sql statement using cn.Execute
The problem I have is when I try and use the stored procedures.
The cmd.Execute gives me -2147217859 "Type in Invalid" and states source is provider.
My connection string is "DRIVER={MySQL Connector/ODBC v5}; Server=localhost;Database=xxx;UID=xxx;Pwd=xxxx; OPTION=3"
Version of

Any help please.

Options: ReplyQuote


Subject
Written By
Posted
ADO: Invalid Command Type and Stored Procedure
February 22, 2007 11:52AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.