DSN Problems with Access

Results 1 to 3 of 3

Thread: DSN Problems with Access

  1. #1
    Join Date
    Dec 1969

    Default DSN Problems with Access

    When connecting to MS Acces with the string:<BR><BR>set conn = server.createobject ("adodb.connection")<BR>conn.open "data"<BR><BR>I irregularly get errors with the connection to the DB, I can sort the problem by simply adding on a bogus username and password:<BR><BR>set conn = server.createobject ("adodb.connection")<BR>conn.open "data", "user", "pw"<BR><BR>However the problem does return and I can fix it by, reverting back to the original by removing the username and password.<BR><BR>I have also tried more explicitly declaring the DSN with:<BR><BR>set conn = server.createobject ("adodb.connection")conn.ConnectionString = "DSN=data"<BR>conn.Open<BR><BR>But the error still eventually reoccurs.<BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default Try this format instead, works fine for me.

    &#060;!--#INCLUDE file="ADOVBS.INC" --&#062;<BR>&#060;%<BR>con="DSN=dsnname; PWD=password"<BR>sql="SELECT * from table;"<BR>set rs=Server.CreateObject("adodb.Recordset")<BR>rs.op en sql, con, adopenstatic<BR>%&#062;

  3. #3
    Join Date
    Dec 1969

    Default Eww.

    I personally think it&#039;s better to manually create the connection and close it.<BR><BR>To the original poster - you might want to try using OLEDB instead of a DSN.<BR><BR>Check this site for connection strings:<BR>http://www.able-consulting.com/ADO_Conn.htm

Posting Permissions

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