BizTalk 2009 Community ODBC Adapter - Generating Schemas from MySQL Stored Procedure - mysql

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()
How to correct the syntax?

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

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

Related

SSIS - Execute SQL Task > Date conversion issue when passing DateTime variable as parameter

Brief background of the system:
Using an SSIS package to move data from SQL Server to MySQL.
I use an OLE DB connection to connect to SQL Server.
I use an ODBC Unicode connection to connect to MySQL.
Most of the system works, but I am having a date conversion issue when passing an SSIS Variable into an Execute SQL Task. It attempts insert a date into a table on the MySQL database. I get the following error when trying to enter a date of {1/1/2010 12:00:00 AM}.
"[Execute SQL Task] Error: Executing the query "Insert into ETLDate values(?)" failed with the following error: "[MySQL][ODBC 5.3(w) Driver][mysqld-5.7.22-log]Incorrect datetime value: '-10165-58296-9719 16613:13824:2136' for column 'LastETLDate' at row 1". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly."
The date is consistently '-10165-58296-9719 16613:13824:2136' so I know the value is getting passed correctly, it's just converted or encoded differently. Here is my setup for the parameter.
Some final notes:
I've tried all the other date data types for the parameter and I get the same issue.
I've tried with just a direct insert statement using the parameter and not a stored procedure and I get the same issue.
All data flow tasks that move data (which includes dates) from the SQL Server DB to the MySQL database work fine.
If create a similar stored procedure and table on the SQL Server DB (with updated parameter settings for the OLE DB connection) it works fine.
Any one know why the date is getting passed incorrectly or have a work around for this issue?

sql server stored procedures in jaspersoft studio 5.6

I have a stored procedure my_sp which takes in two parameters, first an integer and then a date. That is,
EXEC my_sp 265522,'6-10-15'
I have been trying to design a report based on the result set from this procedure in Jaspersoft Studio 5.6. The report does not generate or atleast takes way too long if I use the two parameters though the output data consists of only 25 rows. I am using this query,
exec my_sp $P{param1} , $P{param2}
and feel the probelm is with the syntax only. Also the same query works perfect when I had tried it in Sql Server Management Studio and in jaspersoft studio, stored procedures with a single parameter work like magic. Kindly help me out on this
This should absolutely work.
Add an ! after the P of each parameter
Is the SP creating temp tables? If so try another driver OR create another SP that returns the result of this SP
Try another driver anyway
add the #paramname from tsql = $P{} instead of anonymously naming them

Load XML via MySQL stored procedure

I have run a SQL statement in MySQL which has been executed successfully. I now want to run this as a stored procedure which will eventually be executed via Python (which I am using to scrape from the website initially).
The SQL statement runs, but I am getting the following error with the stored procedure:
ERROR 1314: LOAD XML is not allowed in stored procedures
The SQL statment is bascially:
Load XML Local Infile 'myfile.XML' into table MyTable rows identified by '<DATAROW>'
Am I missing something very basic with MySQL?
This is happening because you are probably using a version wich is up to 5.0.7
As from documentation: this was not more allowed since version 5.0.7
Please check this http://bugs.mysql.com/bug.php?id=14977

How to call a View from a Stored Procedure in Server 2008?

Im in the process of migrating an Access DB to Sql Server 2008 and right now Im converting these Access macros to store procedures. Most of the macos are calling queries so Ill need to convert the queries into views and then have the stored procedure call the views. What is the syntax to call the view?
Same syntax as selecting data from a table:
SELECT *
FROM view

I cant see SQL Queries in MySQL Stored Procedure!

I have created numbers of stored procedures in MySQL through remote access. And those procedures worked well.
After a few days when I connected to Database through remote access. All stored procedures were alive but while was trying to call those procedures, I realized that SQL queries inside procedures had gone. Anyone knows the reason?
If SHOW CREATE PROCEDURE (see docs) isn't showing you the procedures (with SQL queries inside) you probably have some permission problems -- you need to be the owner of the procedure or have SELECT access to the mysql.proc table.