How to connect to a sql database using asp

This shows you how you can connect to a sql database using asp. It’s better to put this code in a seperate file and use a include statement.


Set cnnConn = Server.CreateObject("ADODB.Connection")
FilePath="DRIVER={SQL Server};SERVER=*****;UID=*****;PWD=*****;DATABASE=database_name"
cnnConn.open FilePath

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URL

Leave a comment