Reputation: 11
can anyone show me a sample connection string in asp page with sql server 2005 on vista?
Or any solution to this problem:
Dim cnn As ADODB.Connection
throws an error http 500.
I suppose ado is not correctly installed?
Any ideas?
Upvotes: 1
Views: 542
Reputation: 133
Easy way to create a connection string is to make it using a UDL file.
I've written about it on my blog too here.
Upvotes: 0
Reputation: 2715
Here is an example of what you would use: PROVIDER=SQLOLEDB;SERVER=your_server;UID=your_user_name;PWD=your_password;DATABASE=your_server
Upvotes: 0
Reputation: 84744
connectionstrings.com is your friend:
Connection strings for SQL Server 2005
Edit: The Dim var As Type
syntax is not valid in VBScript (only VB). You need to use Server.CreateObject:
Dim conn
Set conn = Server.CreateObject("ADODB.Connection")
For more information, see ADO Code Examples VBScript on MSDN (which, granted, are pretty horrible samples)
Upvotes: 5
Reputation: 8966
ConnectionStrings.com has a list of SQL Server 2005 connection strings in various formats that you can start with.
Upvotes: 1
Reputation: 7986
Connection strings: http://connectionstrings.com/sql-server-2005
Upvotes: 2