Having trouble connecting to a database

Results 1 to 2 of 2

Thread: Having trouble connecting to a database

  1. #1
    Join Date
    Dec 1969

    Default Having trouble connecting to a database

    I am trying to connect to my database which I usually connect using the following:<BR><BR>Dim cnCon, rstemp<BR>location=server.mappath("/databases/MailingList.mdb")<BR>sourceDSN="DRIVER={Microsoft Access Driver (*.mdb)};"<BR>sourceDSN = sourceDSN & " DBQ=" & location<BR>Set cnCon = Server.CreateObject("ADODB.Connection")<BR>cnCon.o pen sourceDSNSet rstemp = cnCon.Execute("Select * from States")<BR><BR><BR>I am trying to use a connection from a canned script below but am unable to make it work. Can anyone tell me what I might need to do?<BR><BR>Set oCmd = Server.CreateObject("ADODB.Connection")<BR>oCmd.op en "DSN=MailingList;uid=UserName;password=PassWor d" &#039; Open DSN named MailingList<BR>set oRS = oConn.execute ("Select * from States")

  2. #2
    Join Date
    Dec 1969
    Los Angeles, CA

    Default Is there an error message we can look at

    cause my Crystal Ball is in the shop so i need help<BR><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