Using an ODBC DSN (Data Source Name) is a two step process.
1) You must first create the DSN via the "ODBC Data Source Administrator" program found in your computer's Control Panel (or Administrative Tools menu in Windows 2000). Make sure to create a SYSTEM DSN (not a USER DSN) when using ASP. You can also create the DSN via Visual Basic code.
2) Then use the following connection string - with your own DSN
name of course.
oConn.Open "DSN=mySystemDSN;" & _
"Uid=myUsername;" & _
"Pwd=myPassword"
oConn.Open "FILEDSN=c:\somepath\mydb.dsn;" & _
"Uid=myUsername;" & _
"Pwd=myPassword"
For more information, see: About ODBC data sources and
How to Use File DSNs and DSN-less Connections
Note: The problem with DSN is that Users can (and will) modify or delete them by mistake, then your program won't work so well. So it's better to use a DSN-Less or OLE DB Provider connection string - with a Trusted Connection if possible!