schwarzsurfer
Posts: 49
Joined: Wed Feb 10, 2016 11:06 am

Syntax Error while executing SQL Script with SQLite DB

Wed Jan 18, 2017 5:41 pm

Hello,

I try to install a SQLite Database through an msi package and to execute a SQL Script to modify the DB. I created a DB Connection to the SQLite DB file and a script. But I get a Syntax Error message when installing the package and I don't get why...

I try to replace some DB entries with new values, for example:

UPDATE MEDICS_InformationSystemConfigurations SET Serialisation = replace( Serialisation, 'ECRepositoryVariable', 'RepositoryVariable');

This statement works fine when I open the DB for example with "DB Browser for SQLite" but it doesn't work within the MSI package. Do I have to add some more information to the SQL script?

Thank you!
Marian
Ich weiß, dass ich nichts weiß!

schwarzsurfer
Posts: 49
Joined: Wed Feb 10, 2016 11:06 am

Re: Syntax Error while executing SQL Script with SQLite DB

Thu Jan 19, 2017 9:27 am

No idea? :(
Ich weiß, dass ich nichts weiß!

Daniel
Posts: 8237
Joined: Mon Apr 02, 2012 1:11 pm
Contact:  Website

Re: Syntax Error while executing SQL Script with SQLite DB

Fri Jan 20, 2017 1:49 pm

Hello,

Can you please please send us the .AIP (project file) and a verbose log of the installation to support at advancedinstaller dot com so we can investigate them?

If you cannot share with us your project file, then you can try to isolate the behavior in a buildable sample (.aip + its referenced files) which we can build and test on our side.

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

Fazlur Shaikh
Posts: 6
Joined: Fri Oct 22, 2021 2:24 pm

Re: Syntax Error while executing SQL Script with SQLite DB

Thu May 18, 2023 2:55 pm

Hi Team,

Has there been any solution to this issue?
Would be very helpful.

Thanks.

Catalin
Posts: 6544
Joined: Wed Jun 13, 2018 7:49 am

Re: Syntax Error while executing SQL Script with SQLite DB

Mon May 22, 2023 2:15 pm

Hello Fazlur,

I'm afraid not.

If possible, could you please give us some more details about the error you are encountering so we can try to assist?

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Fazlur Shaikh
Posts: 6
Joined: Fri Oct 22, 2021 2:24 pm

Re: Syntax Error while executing SQL Script with SQLite DB

Tue Jun 20, 2023 2:10 pm

Sure Catalin.
I'll share the AIP file.

The issue is for the escape characters like "\" (backslash).
For now we've removed such characters from the scripts and the AIP worked.
But soon, we are planning get the required characters back in the scripts.
Once we update the scripts, I'll share the new AIP file.

Appreciate the support provided by you all.
Thanks.
-Fazlur.

Catalin
Posts: 6544
Joined: Wed Jun 13, 2018 7:49 am

Re: Syntax Error while executing SQL Script with SQLite DB

Wed Jun 21, 2023 2:56 pm

Hello Fazlur,

First of all, you are always welcome and thank you for your kind words!

Now, regarding the "\" character, please note that as far as I'm aware, this is a special character in SQL queries which means escaping:

What does \ (backslash) mean in an SQL query?

Hope this helps!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”