Revenera logo

Some applications never die, for whatever reason.  It may be you have the occasion to connect a dinosaur of a Web application to a modern database server like SQL 2008 SP2, and for whatever reason it doesn't quite connect quite right (i.e. you may see error 0x80004005, E_FAIL).  Notably, you see this issue using Windows Authentication with Legacy ASP Applications, but this isn't necessarily the only example.

What are you to do in this situation?  One way of ensuring compatibility with your shiny new database server is to use Microsoft's SQL Native Client, and configure the connection string to use it instead of the default ODBC provider:

Bad:

Provider=sqloledb;Initial Catalog=MyDb;Data Source=MyServerInstance;Integrated Security=SSPI;

Driver={SQL Server};Server=MyServerInstance;Database=MyDb;Trusted_Connection=True

Good:

Provider=SQLNCLI;Initial Catalog=MyDb;Data Source=MyServerInstance;Integrated Security=SSPI;

Driver={SQL Native Client};Server=MyServerInstance;Database=MyDb;Trusted_Connection=True

InstallShield makes integrating this solution a cinch, as InstallShield 2011 now includes a prerequisite for the SQL 2008 Native Client:

Sql client 

What about Web applications that aren’t “Legacy”, but just not based on a Microsoft technology?  Similar approaches hold true here as well, allowing you to link updated sources from Microsoft into your InstallShield or InstallAnywhere project, depending on platform:

PHP

The latest Microsoft SQL PHP driver relies on the SQL Native Client.  A change in ConnectionString may be necessary to facilitate this, but the InstallShield prerequisite is applicable.

SQL Server Driver for PHP 1.1

http://www.microsoft.com/downloads/en/details.aspx?displaylang=en&FamilyID=ccdf728b-1ea0-48a8-a84a-5052214caad9

Note that a 2.0 driver is available; however, this relies on the SQL Server 2008 R2 Native Client:

Microsoft Drivers for PHP for SQL Server (2.0)

http://www.microsoft.com/downloads/en/details.aspx?displaylang=en&FamilyID=80e44913-24b4-4113-8807-caae6cf2ca05

At this time, InstallShield does not include a prerequisite for SQL Server 2008 R2 Native Client. However, you can include this newer redistributable in your InstallShield project by creating a custom prerequisite via another feature of the Premier and Professional editions of InstallShield:  The InstallShield Prerequisite Editor.

InstallShield icon

InstallShield

Create native MSIX packages, build clean installs, and build installations in the cloud with InstallShield from Revenera.

Java

The same generally holds true for Java-based Web applications utilizing the Microsoft JDBC drivers, linking in the newer compiled libraries, rather than using the prerequisite (sqljdbc.jar, sqljdbc_auth.dll, sqljdbc_xa.dll).

Microsoft SQL Server JDBC Driver 3.0

http://www.microsoft.com/downloads/en/details.aspx?FamilyID=%20a737000d-68d0-4531-b65d-da0f2a735707&displaylang=en

Other Platforms

For other Web application platforms, compatibility with newer versions of SQL Server may be possible via the creation of a DSN that makes use of the latest SQL Native Client driver.

On a related note, forward compatibility is not the only thing that the InstallShield SQL Native Client redistributable is useful for in your installation, as Hidenori’s previous post highlights.