Ad example

Results 1 to 2 of 2

Thread: Ad example

  1. #1
    Join Date
    Dec 1969
    Posts
    16

    Default Ad example

    Does anyone know how to change the code below so that it is dns-less? assume the script is at d:webfoo.mdb<BR><BR>&#060;%<BR> set rstAdvertisement = CreateObject("ADODB.Recordset")<BR> rstAdvertisement.Open "SELECT * FROM Advertisement WHERE Advertisement=" & Request("AdNum"), "DSN=Advertisements"<BR>%&#062;<BR><BR>

  2. #2
    Join Date
    Dec 1969
    Posts
    16

    Default RE: Ad example READ THIS FIRST

    This should have worked<BR>set rstAdvertisement = CreateObject("ADODB.Recordset")<BR> Set MyConn = Server.CreateObject("ADODB.Connection")<BR>MdbFile Path = Server.MapPath("advertisements.mdb")<BR>rstAdverti sement.Open "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & MdbFilePath & ";"<BR>BUT this gives the error<BR>The application requested an operation on an object with a reference to a closed or invalid Connection object<BR><BR>

Posting Permissions

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