SQLTeam.com | Weblogs | Forums

Unable to connect to SQL Server 2012 with native client SQLNCLI



My organization recently upgraded the SQL servers from 2005 to 2012 and the windows clients from Windows XP to Windows 7. We have an application written in Visual Basic 6.0 that connected via native client to the SQL Server 2005. My task is to get the Visual Basic 6 application to connect to the SQL Server 2012.

The connection string is embedded in the application via and the information retrieved from an .ini file. The .ini files reads:
DATABASE=Database Name
PROVIDER=SQLNCLI.1 (Native SQL 2005 client loaded on the PC)

The code that produces the connection string is:
BuildConnect = "Provider=" & Me.Provider & ";Data Source=" &
Me.Server & ";Initial Catalog=" & Me.Database &
";Integrated Security=SSPI"

So the connection string from the above code looks like: Provider=SQLNCLI.1;Data Source=ARCWS4;Initial Catalog=Reliant; Integrated Security=SSPI.

When loading the application and trying to connect to the database I receive the following errors:
"Invalid connection string attribute"
"Cannot create database source recordset"
"Login failed for user ' '. The user is not associated with a trusted SQL server connection"

How can I correct this problem? My goal is to tweak the .ini file versus re-writing the code. Also, is there something on the SQL Server that needs to be configure?



Looks like you'll need to add the login to the SQL Server. Perhaps that step was missed when they did the upgrade. Logins do not get copied over with most upgrade methods such as backup/restore. It's a manual step.


Is there a particular login that needs to be created? All of the users from the old system have been added to the new system.


I just re-read the error, and the app sent a blank login. So the issue is not with the SQL Server. I am not sure if a VB6 app will work okay on Windows 7, but you'll need to investigate why it's not sending the login.