Question

I am using Installshield 2008 Developer Edition and need to run SQL scripts against an existing SQL Server 2005 Express. When I do this without InstallShield, I would have to have some ODBC drivers installed for example.

How does InstallShield do this? Does it include some sort of driver? Or does it depend on preexisting drivers?

Was it helpful?

Solution

If you are having the database installed by Installshield as part of your installation, Installshield has all the information to simply use a connection string like this:

"Driver={SQL Native Client};Server=localhost;Database=newdatabase;Uid=proguser;Pwd=progpass;"

There is no need to create an ODBC connection to use a connection string like this, and Installshield makes the SQL Native Client a prerequisite for SQL 2005 connected databases, so it is assured of having the correct driver available.

OTHER TIPS

InstallShield has built-in support for SQL connections/scripts without the need for rolling custom code. The built-in custom actions use unmanaged ADO, specifically a property exposes the network library to be used:

IS_SQLSERVER_NETLIB_MS -> Network Library=DBMSSOCN

For more information refer to http://support.microsoft.com/kb/238949

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top