David Chappuis

Results 1 to 2 of 2

Thread: David Chappuis

  1. #1
    David Chappuis Guest

    Default David Chappuis

    I&#039m working on a PC, Win95. I made a DSN on the WinNT Server 4.0. It is called Jobsvac.dsn, a System DSN. I&#039m working with the System Administrator who has access to the server.<BR><BR>I&#039m using this code to connect to the DB in a file called employ4.asp:<BR><BR>&#060;%<BR>Set MyConn=Server.CreateObject("ADODB.Connection")<BR> MyConn.Open "jobsvac","Guest","Guest"<BR>Set RS=MyConn.Execute("Select REQ NO From Jobs")<BR>Response.Write(RS("REQ NO"))<BR>MyConn.Close<BR>&#037;&#062; <BR><BR>The file is called employ4.asp and is on the server in the website directory.<BR><BR>when I ran the page within the browser by typing - WWW.plansys.com/employ4.asp, I recieved 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>/employ4.asp, line 15<BR><BR><BR>Another problem, to get this message again, the System Admin. has to reboot the server. I can not get this error message again until he reboots the serve! Otherwise, when I run the code again, the browser just hangs as if it is looking and can&#039t find anything. Then I press stop and the TRANSACTION STOP error appears. <BR><BR>I don&#039t understand how the server is working.<BR><BR>Can any one help me, Dave

  2. #2
    John Harvey Guest

    Default RE: David Chappuis

    When you open an ADO Connection, you need to pass it the DSN as part of the call <BR>The syntax is<BR>adObj.Open (ConnectionString, User ID, Password, Options)<BR>The connection string has a format as well that depends on the database being used. For a Microsoft Access Database it looks like this:<BR>ConnStr = "DSN=DBName;DBQ=D:InetpublahlahDBName.mdb;Driver Id=25;FIL=MS Access;MaxBufferSize=512;PageTimeout=5;"<BR>For an Oracle DB it looks like this:<BR>ConnStr = "DSN=DBName;User Id=blah;PASSWORD=blahblah;SERVER=blahblahblah;"<BR >Hope that Helps, if not, reply to this message

Posting Permissions

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