I have an XP Pro machine running a classic ASP site in IIS - the version that comes on the XP Pro CD. The site makes a connection to an MSDE database on the same machine named InControl. I have moved that database to SQL Express 2005 and want to test it with the ASP site. SQL Express 2005 is running on a separate Vista machine. I am currently using this connection string:
objConn.ConnectionString = "Provider=SQLOLEDB;Data Source=400SC;Initial Catalog=InControl;User ID=" & uid & ";Password=" & upass & ""
Where 400SC is the name of the XP Pro machine and InControl is the database. The variables uid and upass are pulled from Session when the connection string is created.
I have tried different Provider names and various combinations of server name and ip address with and without port numbers for the Data Source. All of them yield some variation of this error:
Microsoft OLE DB Provider for SQL Server (0x80004005)
[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied.
What should the connection string look like?
Thanks for the help.
PS - If the solution involves a port, do I need to make that port an exception in the Vista Firewall?
The sqlexpress server may have an instance name. Try changing it to "Data Source=400SC\SQLEXPRESS"
|||
This is the string I initially tried to access SQL Express on the other computer - CSC_DELL. I recieved the error message in the original post. Hard coding the User ID and Password also yeilds the same error. The User is set-up in SQL and the database.
objConn.ConnectionString = "Provider=SQLOLEDB;Data Source=CSC_DELL\SQLEXPRESS;Initial Catalog=InControl;User ID=" & uid & ";Password=" & upass & ""
|||Create a new file on your desktop. Rename the file to "test.udl" Double-click the file, and create a connection to your database. Once the "Test Connection" succeeds, then close the dialog box and view the contents of your .udl file in notepad. This will give you a connection string to compare against.
|||Created a .udl file, but the SQL Express server on the Vista machine was not listed in the Server drop down list. I used the SQL Configuration tool and enabled listening with TCP/IP and Named Pipes - both were disabled. Also made a 1433 port exception in the Vista firewall. Tried udl, again, and the server still did not show. Both computers are in the same workgroup on my home network. I tried typing the name of the SQL Express server in the drop down list - didn't work. Everything I try yields the "SQL Server does not exist or access denied." Still stuck.
No comments:
Post a Comment