Domain Accounts
Domain Account Transfer Domain WHOIS
PLACE ORDER
FAQs FORUMS NEWS
ACCEPTABLE USE PRIVACY & SECURITY |
Database Open/DSNless connection Any ASP script that needs to connect to a database must open it on the server first. There are two ways:
A DSN connection requires either the server administrator to setup a DSN on the server using the control panel, or that you use a 3rd party ASP component so your ASP scripts can make the registry changes on the server to create their DSNs as needed.
Microsoft has a knowledge base article at: DSN connections generally at a minimum require a DSN name, user, and password. This line in our tutorial would open a DSN named "student" as a user named "student" with a password of "magic".
set conntemp=server.createobject("adodb.connection") What if we didn't have a DSN? And we knew the name of the file (i.e. file based databases like Access, Paradox, FoxPro, etc.) or the name of the data source (SQLserver for example). Here is the way we could open a data source without a DSN! Note that you must know the actual filepath on the server, i.e. nwind.mdb is not good enough it needs to be "C:\thatserver\account17\nwind.mdb". Fortunately the server.mappath function can turn a filename into the proper fully qualified filename with path on the server.
set conntemp=server.createobject("adodb.connection")
<HTML><HEAD> Here is a list of the typical ODBC driver names you must supply:
|