Connecting from ASP using a UDL file

Results 1 to 2 of 2

Thread: Connecting from ASP using a UDL file

  1. #1
    Join Date
    Dec 1969

    Default Connecting from ASP using a UDL file

    Hi there, I am new to asp programming and I have not used ADODB before. Can someone tell me what I am doing wrong in this piece of code here. Very many thanks in advance.<BR><BR>Option Explicit<BR>Dim rsModules<BR>Dim oConn<BR>Dim sName<BR>Dim iID<BR><BR>Set oConn = Server.CreateObject("ADODB.Connection")<BR>oConn.O pen "FILE NAME=db.udl"<BR><BR>rsModules = Server.CreateObject(“ADODB.Recordset”)<BR><BR> rsModules.Open “select moduleID, name, description from modules”, oConn<BR><BR>While Not rsModules.EOF<BR> iID = rsModules(“ModuleID”)<BR> sName = rsModules(“Name”)<BR> sDescription = rsModules(“Description”)<BR> Response.Write sID & “: &#060;b&#062;“ & sName & “&#060;/b&#062; “ & sDescription & “&#060;br /&#062;”<BR>Wend<BR><BR>Response.Write “&#060;p&#062;Finished: ” & Now & “&#060;/p&#062;”<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Connecting from ASP using a UDL file

    must not work!<BR><BR>open that udl file in notepad, copy the str command from there and make ur code like.<BR><BR>Set oConn = Server.CreateObject("ADODB.Connection")<BR>oConn.O pen "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=db1.mdb;Persist Security Info=False"<BR>blah blah...<BR><BR><BR>(I have connected to access db called db1.db in the path of that asp page)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts