views:

45

answers:

4
+1  Q: 

connection string

hi 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?

+4  A: 

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)

Richard Szalay
You beat me to it by 14 seconds :)
Jason Kealey
+2  A: 

Connection strings: http://connectionstrings.com/sql-server-2005

Jason Kealey
+1  A: 

ConnectionStrings.com has a list of SQL Server 2005 connection strings in various formats that you can start with.

Tim S. Van Haren
A: 

Here is an example of what you would use: PROVIDER=SQLOLEDB;SERVER=your_server;UID=your_user_name;PWD=your_password;DATABASE=your_server

Alos