Running a SQL Script on Install...Incorrect Syntax Near '[]' - Advanced Installer Community

We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

nickrawlins
Posts: 3
Joined: Tue Jan 22, 2008 5:42 pm

Running a SQL Script on Install...Incorrect Syntax Near '[]'

Hi,

I'm trying to execute a SQL script on product install, however i've getting the following error when it runs: SQLExecDirect {SQL Error}: [Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near '[]'. (where [ ] seems to be a squarebox... maybe a tab?).. .can't seem to find the asci char for it to display it here!

The Script contains 1 line: CREATE TABLE [IB_LICMON] ([LoginID] [varchar] (50) NULL,[Module] [varchar] (50) NULL,[Date] [datetime] NULL CONSTRAINT [DF_IB_LICMON_Date] DEFAULT (getdate()),[Text] [varchar] (100) NULL,[CurrentNumUsers] [int] NULL)


SQL Profile seem to return this: [][]C


So.. it sounds like either the installer is currupting the script or it doesn't like the ANSI format etc.. i've tried different file types and nothing seems to work..

Can anyone help?

Thank you!

Nick
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Running a SQL Script on Install...Incorrect Syntax Near '[]'

Hi,

I'm not sure how your project is configured. Can you please send us the AIP (Advanced Installer Project file) you are using to support at advancedinstaller dot com so we can investigate it?

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Running a SQL Script on Install...Incorrect Syntax Near '[]'

Hi Nick,

You are encountering this behavior because Advanced Installer 5.2.2 did not have support for Unicode SQL Scripts (this feature was included in the 6.0 version).
Please encode your SQL Script in ANSI and let me know if the problem persists.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”