cancel
Showing results for 
Search instead for 
Did you mean: 
umairvb
Pilgrim

MySql Script Error in Installshield

I use InstallShield 2009 BASIC MSI to install my own application which uses MySQL.

Actually i am running MySQL script in installshied 2009 SQL script view.

here i am getting error.

Error 27506 ERROR executing sql script [MySql][ODBC 3.51 Driver]
[mysql 5.1.25 vc community ,You have an error in your script check the manual the corresponds to your Mysql server version for the right sytax.


It is executing nicely in MySQL. But in installshield it is showing this error.

Here my some script like


DROP TABLE IF EXISTS `testingdb`.`tbl_adminpassword`;
CREATE TABLE `testingdb`.`tbl_adminpassword` (
`PK` int(10) unsigned NOT NULL AUTO_INCREMENT,
`AdminPassword` varchar(255) NOT NULL,
PRIMARY KEY (`PK`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;


DROP TABLE IF EXISTS `testingdb`.`tbl_department`;
CREATE TABLE `testingdb`.`tbl_department` (
`DepartmentPK` int(10) unsigned NOT NULL AUTO_INCREMENT,
`DepartmentName` varchar(150) NOT NULL,
PRIMARY KEY (`DepartmentPK`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;


Please give me answer urgent because i will give setup to client.
Labels (1)
0 Kudos
8 Replies
hidenori
Pilgrim

Re: MySql Script Error in Installshield

Do you specify ; as the batch separator for your connection? The default batch separator is GO. You can change the setting in the Advanced tab.
0 Kudos
umairvb
Pilgrim

MySql script Error

Tkanks for reply hidenori
I specify ; batch operator in Advanced tab ,but again same error

Error 27506 ERROR executing sql script [MySql][ODBC 3.51 Driver]
[mysql 5.1.25 vc community ,You have an error in your script check the manual the corresponds to your Mysql server version for the right sytax.

what i am getting wrong,please help urgent
0 Kudos
hidenori
Pilgrim

Re: MySql Script Error in Installshield

If you have inline comments (lines start with --) in your script, please remove them and see if it solves your issue. MySQL seems to support only block comments (/**/).
0 Kudos
umairvb
Pilgrim

MySql Stored procedure Error

Thanks hidenori MySql Table create successfully but few problem remaining.

when execute stored procedure it give error

Error 27506 ERROR executing sql script [MySql][ODBC 3.51 Driver]
[mysql 5.1.25 vc community ,You have an error in your script check the manual the corresponds to your Mysql server version for the right sytax.


Here my stored Procedure


DELIMITER $$

DROP PROCEDURE IF EXISTS SP_DELETE_LOGO$$
CREATE PROCEDURE SP_DELETE_LOGO()
BEGIN

delete from tbl_logo;

END $$

DELIMITER ;


I am also remove DELIMITER but give same error.

My second problem is installshield not populate data

insert into tbl_adminpassword(AdminPassword) Values('admin');


Please Help urgent
0 Kudos
hidenori
Pilgrim

Re: MySql Script Error in Installshield

You cannot use the DELIMITER command in InstallShield because it is a MySQL client command, not a SQL statement. What you can do is to use a different batch separator from ; and change your SQL script as follows:

DROP TABLE IF EXISTS `testingdb`.`tbl_adminpassword`;
/

CREATE TABLE `testingdb`.`tbl_adminpassword` (
`PK` int(10) unsigned NOT NULL AUTO_INCREMENT,
`AdminPassword` varchar(255) NOT NULL,
PRIMARY KEY (`PK`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/

DROP TABLE IF EXISTS `testingdb`.`tbl_department`;
/

CREATE TABLE `testingdb`.`tbl_department` (
`DepartmentPK` int(10) unsigned NOT NULL AUTO_INCREMENT,
`DepartmentName` varchar(150) NOT NULL,
PRIMARY KEY (`DepartmentPK`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/

DROP PROCEDURE IF EXISTS SP_DELETE_LOGO;
/

CREATE PROCEDURE SP_DELETE_LOGO()
BEGIN

delete from tbl_logo;

END
/


Note that you need to specify / in the Batch Separator setting on the Connection | Advanced tab
0 Kudos
umairvb
Pilgrim

MySql Server Configuration save in registry

Thanks you for help me hidenori,the Tables ,Stored procedure create nicely ,but i want used Mysql server configuration setting in C#.Net like servername,userid and password for configuration purpose ,please tell me how to get values
0 Kudos
hidenori
Pilgrim

Re: MySql Script Error in Installshield

You need to write a custom action to read the connection information from the registry, and set them to the Windows Installer properties associated with connection settings of InstallShield. You can find the names of the underlying Windows Installer properties in the Connection | Advanced tab of the SQL Scripts view.

Hope that helps.
0 Kudos
hcl_60
Pilgrim

create and call mysql stored procedures

How to create a stored procedure and call the created stored procedure(via script) of MYSQL from installshiled.


thanks in advance..
0 Kudos