kahmad
Posts: 9
Joined: Thu Jun 27, 2013 11:47 pm

How to create SQL Server database without ODBC?

As part of the installation we would like to create a SQL Server database using SQL scripts. I currently have the following on the SQL Scripts page in Advanced Installer.

CustomConnection
Condition: CHECKBOX_DATABASE
Connection Type: Microsoft SQL Server / MSDE
Connection string: Data Source=[DB_SERVERNAME];User ID=sa;Password=[DB_SAPASSWORD]
Login timeout (sec): 60
Connection and all its scripts are verbose: Checked

Transaction

Script_File
Run SQL: at install
Condition: CHECKBOX_DATABASE
On error: Abort installation

There is also a SQL Script Replace.

I have built the installation and tried to run it on a test machine which resulted in the following error.

[SQLDriverConnect] {SQL_STATE: IM002}
[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

[OK]

As a result I have the following questions.

1. Does the SQL Scripts portion of Advanced Installer require an ODBC connection?
2. Is there a way to utilize the SQL Scripts portion of Advanced Installer with a different connection method (ADO DSN-less, OleDb, etc)

Your help is greatly appreciated!
Dan
Posts: 4529
Joined: Wed Apr 24, 2013 3:51 pm

Re: How to create SQL Server database without ODBC?

Hello,
1. Does the SQL Scripts portion of Advanced Installer require an ODBC connection?
Indeed, the SQL Script from Advanced Installer require an ODBC connection.
Please notice that the ODBC driver is not mandatory to be on the target machine. You can have the ODBC driver as a prerequisite in your package and install only if it is not on the target machine.
You can take a look on our Add Prerequisite tutorial.

You can also have the ODBC driver in your package and install it as a feature.
You can take a look on Using SQL Scripts tutorial which may be helpful.
2. Is there a way to utilize the SQL Scripts portion of Advanced Installer with a different connection method (ADO DSN-less, OleDb, etc)
Unfortunately, we don't have predefined support for other connection types.

Also, as a side note, please do not duplicate a question on the forums if you have already sent us an e-mail with it. Both communication channels have the same priority to us, therefore posting the question in both places doesn't really help.

If you have any questions please let us know.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”