[thelist] RE: Problems using asp/inc pages in windows 2000

Brian King BKing at Impact-Technologies.com
Wed Jul 25 12:06:51 CDT 2001


I personally like to script DSNless connections.  Code is more portable, (I
don't have to get up from my chair and walk over to the server to set it up
then).  Example below;

Set Conn = server.CreateObject("ADODB.Connection")
Conn.ConnectionString =
"Server=yourserver;db=dbname;;uid=userlogin;pwd=userpassword;driver={ODBCDri
vername}"
Conn.Open
sql="SELECT firstname FROM test01"
Set objRS = Server.CreateObject("ADODB.Recordset")
objRS.Open sql, Conn, 1, 2

Brian W. King

I also have a snippet for an Access db connect if you need it.





More information about the thelist mailing list