Results 1 to 7 of 7

Thread: Data source name not found[resolved]

Threaded View

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Sep 2004
    Location
    ontario
    Posts
    24

    Resolved Data source name not found[resolved]

    This one sounds simple even to me.. sounds like a typo. But I can't find it.

    This code works when adding a new entry:

    Code:
    Set Conn = Server.CreateObject("ADODB.Connection")
           
    DSNName = "DRIVER=Microsoft Access Driver (*.mdb);DBQ="
    DSNName = DSNName & Server.MapPath("/honeyanded/database/wedding.mdb")
    Conn.Mode = 3	'3 = adModeReadWrite
    Conn.Open DSNName
    Conn.Execute(query)
    Conn.Close
    But this code gives an error (Data source name not found and no default driver specified) when I use it to open the database before reading the recordsets I need.

    Code:
    set Conn = server.CreateObject( "ADODB.Connection" )
    
    DSNName = "DRIVER=Microsoft Access Driver(*.mdb);DBQ="
    DSNName = DSNName & Server.MapPath("/honeyanded/database/wedding.mdb")
    Conn.Open DSNName
    I don't see why one works and the other doesn't.
    Last edited by CandyCanuck; Jan 27th, 2005 at 06:58 AM. Reason: resolved

Posting Permissions

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



Click Here to Expand Forum to Full Width