Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 8th, 2003, 02:05 PM
Registered User
 
Join Date: Jul 2003
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default SQL Server Connection

I know that this is a simple question but it seems like have tried just about everything to connect to a SQL Server but i still cant. So, can someone please provide me with a connection string to a SQL Server??

Thanks

 
Old July 8th, 2003, 09:50 PM
Authorized User
 
Join Date: Jun 2003
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Default

example:

Dim sConnStr, cn
sConnStr = "PROVIDER=SQLOLEDB; DATA SOURCE=YourSQLServer;" & _
           "INITIAL CATALOG=YourDB; USER ID=YourName;" & _
           "PASSWORD=YourPassword;"
Set cn = Server.CreateObject("ADODB.Connection")
Call cn.Open(sConnStr)

Regards,
Khoa Nguyen





Similar Threads
Thread Thread Starter Forum Replies Last Post
SQL Server Connection MonkeyMan666 C# 2 November 14th, 2008 10:44 AM
Connection to SQL Server brijxp ADO.NET 1 November 18th, 2006 08:34 AM
connection string for sql server rj1406 ASP.NET 1.0 and 1.1 Basics 6 September 16th, 2004 02:49 PM
Sql server connection failed AcidHell2 All Other Wrox Books 0 February 26th, 2004 01:57 PM
Connection with sql server arshad mahmood VB Databases Basics 1 June 19th, 2003 10:53 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.