DATETIME SELECT SELECT INTO DATE PAD STRING DYNAMIC SQL CURSOR MONEY FORMAT PERCENT STORED PROCEDURE SQL SERVER AGENT JOB OPTIMIZATION WHILE LOOP OVER PARTITION BY UPDATE
 
 
SITE SEARCH SQLUSA.com VIDEOS
 
 
SQL E/BOOKS   WORLD, USA & SQL NEWS   FORMAT
SCRIPTS SQL 2005 SQL 2008 ARTICLES
How to connect to a SQL Server database from ASP?

The following sample demonstrates how to establish a connection to a database InvMaster:


-- Connect
<%
Dim StrConnInventory
Dim ConnInventory

StrConnInventory = "Provider=SQLOLEDB.1;Data Source=HeadQtr;Initial Catalog=InvMaster;User ID=finance;Password=f!nAnCe**"

Set ConnInventory = Server.CreateObject("ADODB.Connection")

ConnInventory.ConnectionTimeout = 4000
ConnInventory.CommandTimeout = 4000
ConnInventory.Open StrConnInventory
%>

-- Disconnect
<%
ConnInventory.Close
Set ConnInventory = Nothing
%>

Related articles:

How to Connect to Database using a Connection String

Connecting to Databases in ASP.NET

 

Exam Prep 70-461
SQL 2016 DESIGN & PROGRAMMING
 
 
 
DATETIME SELECT SELECT INTO DATE PAD STRING DYNAMIC SQL CURSOR MONEY FORMAT PERCENT STORED PROCEDURE SQL SERVER AGENT JOB OPTIMIZATION WHILE LOOP OVER PARTITION BY UPDATE