DSN Connection Method for ASP
Internet to database DSN connection string is shown in the example below. DSN
connections can be used with a Microsoft Access databases and other ODBC
Dim conn as DB.Connection
Dim rst as DB.Recordset
Dim sql as string
Set conn = Server.CreateObject(" DB.Connection")
Are you just starting out on your quest for a small business database? Need some advice or someone to bounce ideas off of? We are happy to chat with you to discuss options to your situation.
Did you know that most template databases often do not do exactly what you need done? We can create a custom template that fits your needs exactly.
your_dsn = the DSN you have setup using ODBC
database connection in your control panel, or a DSN setup by the remote hosting company
who hosts your website, or your in house network support group.
username = the username you have
identified in the database, or the default 'Admin' username.
password = the password you have
setup in the database or "Pwd=;" for no password.
'-------------- here we use the connection
sql = "select sales_rep, dollars from sales_by_rep_chart"
Set rst = Server.CreateObject(" DB.Recordset")
rst.Open sql, conn, 3, 3
Set Session("mysession") = rst
Where mysession is any name
for the session.
When done with the recordset don't forget to close it: