mysql stored procedure scripts delimeter problem - Advanced Installer Community
mahbub
Posts: 4
Joined: Fri Jul 15, 2011 7:50 am

mysql stored procedure scripts delimeter problem

Dear all, I can run mysql sql script file with create table and data. But can not run with stored procedure. Delimeter syntax error problem occures.
Can you help me in this issues to run stored procedure sql script.
Thanks in advance.
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: mysql stored procedure scripts delimeter problem

Hi,

I'm not sure why this happens. Can you please send us your .AIP (project) file and SQL Script to support at advancedinstaller dot com so we can investigate them?

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
mahbub
Posts: 4
Joined: Fri Jul 15, 2011 7:50 am

Re: mysql stored procedure scripts delimeter problem

Dear Mr. Cosmin,
I am glad that you replied.
I am using mysql database, created odbc driver using myodbc5.dll and myodbc5s.dll, created local connection and sql scripts to run.
Here project(.aip) and .sql file is attached, please verify the project and let me know, its urgent.
N.B. my script contains data and stored procedure. Database, table and data are imported correctly but failed while executing stored procedures.

I have sent the project(.aip) and sql file to support at advancedinstaller dot com.

Thanks.
mihai.petcu
Posts: 3860
Joined: Thu Aug 05, 2010 8:01 am

Re: mysql stored procedure scripts delimeter problem

Hello,

Does the .SQL file you sent via e-mail work as expected if executed manually outside the installer?

All the best,
Mihai
Mihai Petcu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
mahbub
Posts: 4
Joined: Fri Jul 15, 2011 7:50 am

Re: mysql stored procedure scripts delimeter problem

Hi Mihai,
The .sql file i sent via e-mail is imported successfully when i run it through mysql command or mysql administrator to restore or heidisql.
It stops to run through advance installer at the time of stored procedures. Error occurs like mysql syntax error near delimeter. I am sending you another file which contains only one stored procedure named getTrPartsNew. Please check it where i am wrong.
Thanks.

Mahbub
Attachments
gettrpartsnew.txt
(5.35 KiB) Downloaded 688 times
CiprianComsa
Posts: 110
Joined: Thu Aug 19, 2010 10:11 am
Contact: Website

Re: mysql stored procedure scripts delimeter problem

Hi,

We can reproduce this behavior on our test machine. This behavior is reproduced because you are using more than one separator between SQL statements in the same script.
We don't have support for multiple separators between SQL statements. You can split your SQL script in multiple scripts for each separator and specify the separator in Statement Separator field.
Please note all scripts will be executed in the order they appear in the tree.

Regards,
Ciprian
__________________________________________________________________________________________________________________________________________________
Ciprian Comsa
Advanced Installer Team
http://www.advancedinstaller.com/
Ciprian Comsa - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
mahbub
Posts: 4
Joined: Fri Jul 15, 2011 7:50 am

Re: mysql stored procedure scripts delimeter problem

Hi,

Thanks, I got the point. You only support two separator ; and GO.
Now I have lost the path :).
You support two separators( ; and GO). Will you Please help me to get rid of the situation to split the previous attached gettrpartsnew stored procedure in multiple scripts with these separators? I need an example.

Thanks for your valuable time.

Regards,
mahbub.

*** Advance installer is the most useful installer that i have ever seen. If I can run the sql scripts with stored procedure, that will be great!
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: mysql stored procedure scripts delimeter problem

Hi,
You only support two separator ; and GO.
No, you can set any separator you want.
Will you Please help me to get rid of the situation to split the previous attached gettrpartsnew stored procedure in multiple scripts with these separators?
Although Advanced Installer supports any separator, it cannot use multiple separators at once. So you need to decide on a single separator and use it in your entire script. Changing separators inside the script is not supported.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
sineater
Posts: 7
Joined: Thu Mar 02, 2017 3:43 pm

Re: mysql stored procedure scripts delimeter problem

Hello Mahbub,

Did you solved that problem?

cuz im getting same problem on my project to. i tried to use different scripts to every stored procedure but its still same. If you find any solution plz share it.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: mysql stored procedure scripts delimeter problem

Hello,

When using SQL Scripts using two or more delimiters, then you should not use any separators in the Advanced Installer project. That way your SQL script will be executed as it is and the SQL Server will parse the script parameters. Just go to "SQL Databases" scripts, select your SQL Script and make sure there is no separator character set in the "Statement separator" field. Just leave this field empty.

Hopefully this info will be useful for future users facing with a similar scenario.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”