Microsoft
Software
Hardware
Network
Question : Connect VB6 to SQL 2008
I have several programs that I've been using for years in VB6 that connect to a SQL 2000 server, I'm looking to upgrade the Db server to SQL 2008 and am having trouble connectiong to the 2008 server. Do I have to make changes to the connection string for SQL 2005/2008?
Here is my connection that im using now to connect to the SQL 2000 server:
Dim DBNAME As String, SERVERNAME As String
DBNAME = "database" 'SUBSTITUTE YOUR DATABASE NAME HERE
SERVERNAME = "server\instance" 'SUBSTITUTE YOUR SQL SERVER NAME HERE
cn.ConnectionString = "Provider=SQLOLEDB.1;Integ
rated Security=SSPI;Persist Security Info=False;Initial Catalog=" & DBNAME & ";Data Source=" & SERVERNAME
cn.Open '<---Fails when opening connection with the attached error message
rs.ActiveConnection = cn
rs.CursorLocation = adUseClient
rs.CursorType = adOpenStatic
rs.LockType = adLockBatchOptimistic
rs.Source = "SELECT * FROM table ORDER BY lastname, firstname"
rs.Open
It fails at the cn.open with "SQL server does not exist or access denied"
Im using integrated security and the login i'm using has dbo on the database.
Any help would be greatly appreciated!
Thanks!
Answer : Connect VB6 to SQL 2008
In Sql Server configuration manager
Did you enabled TCP/IP and named pipes on the protocols for the sql server? (under sql server network configuration)
Normally this is default disabled and you can only connect to the server locally.
Random Solutions
Processing multiple textr files usiing dataadapter
Automation error when using MSGraph in Access 2000
Illegal operation
Userform - button for close and save
Net Time reporting wrong time to workstations.
Really Uninstall previous versions of Microsoft Office if I like to try Office 2010?
Adding AD Custom User Attributes
Error: "The action cannot be carried out while processing a form event."
Code: 0x80012017 The package path referenced an object that cannot be found: "\Package\Subplan.Disable"<wbr />
WSUS Scheduled Install Time for systems in different time zones