Sunday, March 25, 2012

ASP SQL SERVER CONNECTION

how can i connect sql server with ASP vbscript?
thanksThere are various sites that show you how to connect to SQL Server using
VBScript from ASP. Some are listed at: http://vyaskn.tripod.com/asp.htm
--
HTH,
Vyas, MVP (SQL Server)
SQL Server Articles and Code Samples @. http://vyaskn.tripod.com/
"dora" <dora.san@.freemail.gr> wrote in message
news:em%234DrjHFHA.896@.TK2MSFTNGP10.phx.gbl...
how can i connect sql server with ASP vbscript?
thanks|||Hi
Try something like this.. put it in a separate ASP module and INCLUDE it in
your ASP in a suitable place...
'--
Set odbCon = Server.CreateObject("ADODB.Connection")
odbCon.Open "Driver={SQL
Server};SERVER=SN;DATABASE=dbName;UID=us
erID;PWD=password;"
'---
sn is the server name and can ce local (eg "Server42") or remote (eg
SSDB210.ahostsite.com)
hope this helps
Jim MCDonald
"dora" <dora.san@.freemail.gr> wrote in message
news:em%234DrjHFHA.896@.TK2MSFTNGP10.phx.gbl...
> how can i connect sql server with ASP vbscript?
>
> thanks
>

No comments:

Post a Comment