Newcomer, Ascess database connection dilemma!!!

Results 1 to 3 of 3

Thread: Newcomer, Ascess database connection dilemma!!!

  1. #1
    Nik Nikam Guest

    Default Newcomer, Ascess database connection dilemma!!!

    I have PWS. I&#039m trying to open it using a DSNless appraoch.<BR><BR>&#060;%@Language="VBScript"%&#062 ;<BR>&#060;!--#INCLUDE FILE="adovbs.asp" --&#062;<BR>&#060;%<BR>&#039Declare all local variables<BR><BR>dim conn<BR>dim rs<BR>dim strID<BR>dim strconn<BR>dbfile="diag.mdb"<BR>strconn="DRIVER={M icrosoft Access Driver(*.mdb)};" & "DBQ=" & Server.MapPath(dbfile)<BR><BR>set conn = Server.CreateObject("ADODB.connection")<BR>conn.op en strconn<BR><BR>set rs = server.createobject("adodb.recordset")<BR>rs.Open "DIAGNOSIS", conn,adopenstatic, adlockoptimistic ...<BR><BR>However I keep geeting this error:<BR><BR>Microsoft OLE DB Provider for ODBC Drivers error &#039 80004005&#039 <BR><BR>[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified <BR><BR>/cardiology/uddiag.asp, line 26 <BR><BR>I&#039m using FP2000. I don&#039t know why I get this error. I&#039ve read several books and looked at many on-line examples. But, I can&#039t get my code to open the DB file for display or update. I&#039ve even set the DSN using the OBDC from the control pannel. The PWS option is set to execute.<BR><BR>Please shed some light and direction.<BR>

  2. #2
    Join Date
    Dec 1969
    Posts
    760

    Default RE: Newcomer, Ascess database connection dilemma!!

    &nbsp;<BR>This looks suspect...<BR>-&#062;strconn="DRIVER={Microsoft Access Driver(*.mdb)};" & "DBQ=" & Server.MapPath(dbfile)<BR>set conn = Server.CreateObject("ADODB.connection")<BR>conn.op en strconn<BR><BR>Try using the odbc DSN name and nothing else.<BR>-&#062;conn.open ="DSNName"<BR>

  3. #3
    Vivek Nama Guest

    Default PWS does not allow usage of user DSN

    Apparently PWS does not allow one to use user DSN<BR>so use a system DSN <BR>OR a file DSN<BR>cn.open "FILE NAME=path of file.dsn", "username", "password"<BR>using the format "FILE NAME=path of file.dsn;uid=UID;pwd=PWRD"<BR>reports too long connectionstring so be careful<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
  •