UDL Data Link Tools Microsoft Activex Data Object
This example shows the method for the OLE DB Data Link
database connection string.
Dim conn as DB.Connection
Dim rst as DB.Recordset
Dim sql as string
Absolute path to the UDL file:
Conn.Open "File Name=UDL_filename.udl;"
Our programming team has 15 members containing a wide variety of technical database knowledge and programming experience. Experts in small business management and scientific database programming.
Did you know you don't need to move to SQL/Server to run and manage your Access database on the net. There are many alternative solutions. Among them are Amazon's AWS cloud services and various hosting services in nearly every state.
UDL_filename = The name of the Universal Data Link
file as created below:
To create a Universal Data Link:
Create an empty text file using a text editor, such as notepad. Save
the file with a .udl extension. Then, right click on the file and select
Properties. Fill in the connection specification fields. Here is a
snapshot of the 'connection' tab of the UDL connection properties editor screen:
'-------------- here we use the database 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: