views:

95

answers:

2

Hi,

I am am currently trying out the Community ODBC Adapter (from TwoConnect) to call stored procedures on a MySQL database.

I have been able to use the MySQL ODBC driver to connect to the database, but when generating the schemas for a stored procedure with input parameters I am getting the following error:

Incorrect Number of arguments for Procedure addupdate_product; expected 7, got 0

This error occurs following the press of the Generate button, with the Query:

addupdate_product()

Any help on the correct syntax to use at this stage would be appreciated.

Cheers

Stu.

+1  A: 

SHOW CREATE PROCEDURE addupdate_product; doesn't tell you which parameters to provide, or are they not coming through?

Wrikken
Stored procedure header in MySQL: "addupdate_product(in clientid int, in productid varchar(80), in barcode varchar(80), in productname varchar(80), in colour varchar(80), in size varchar(80), in productcategory varchar(80))"Schema generator Statement Information: "addupdate_product"Pressing generate error: "Incorrect Number of arguments for Procedure addupdate_product; expected 7, got 0"I was expecting that it should look at the stored procedure and create a request schema with 7 parameters for me, if you have any ideas on what I should be doing instead it would be greatly appreciated.
Stuart Brierley
I have no idea which magic you expect from (and is built in) the client program (not the connector itself) you're using, but usually there is no magic involved and you have to add the parameters yourself instead of letting the code guess....
Wrikken
Hi, have you used any of the other BizTalk Adapters? Using the standard SQL adapter you point it at the Stored Proc and you then get a schema representing the input parameters of the Stored Proc - no manual parameter adding needed. I was assuming that the ODBC adapter would behave in a similar manner - and for a stored proc with no parameters it works fine, giving a schema with no parameters and a response schema with the appropriate fields. My problem as described is that when attempting to generate the schema for a stored proc with parameters this approach does not seems to be working.
Stuart Brierley
A: 

I have now figured out how to use the ODBC Adpater with a MySQL stored procedure that has parameters.

The key to this is not selecting the stored procedure option and instead using the SQL Script option.

Full details can be found here :

http://geekswithblogs.net/StuartBrierley/archive/2010/06/09/biztalk-2009---the-community-odbc-adapter-schema-generation-with.aspx

Stuart Brierley