Data source name not found and no default driver s

Results 1 to 8 of 8

Thread: Data source name not found and no default driver s

  1. #1
    Join Date
    Dec 1969

    Default Data source name not found and no default driver s

    HEEELP!!!!<BR>I have tested all my asp pages on my own machine using PWS, Access and a DSN connection. Everything worked just fine! Now I have moved the database to SQL Server 7 on a server and created a DSN for it on the server (which tested successfully). I moved a few of the ASP pages to the server and changed the “name” in Connection.asp to the name of the new DSN: <BR><BR>Connection.asp<BR>&#060;% <BR> &#039 Open up a connection to our Access database using a DSN<BR> Dim objConn<BR> Set objConn = Server.CreateObject("ADODB.Connection")<BR> objConn.ConnectionString = "DSN=WomensSearch.dsn"<BR> objConn.Open<BR>%&#062;<BR> <BR>HOWEVER, I get the following error message: <BR>Microsoft OLE DB Provider for ODBC Drivers error &#039 80004005&#039 <BR>[Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified <BR>/Connection.asp, line 6<BR><BR>The ASP files ARE on a different “Drive” than SQL Server, is this part of the problem?<BR><BR>I can’t find anything like this (SO FAR) on any of the prior postings OR FAQs (ASP or Database),<BR>PLEASE GIVE ME A HINT!!!<BR>

  2. #2 body and soul Guest

    Default This is what i do... "DsnName", "UserID", "Password"<BR><BR>&#062;objConn.ConnectionStri ng = "DSN=WomensSearch.dsn"<BR><BR>what is WomensSearch.dsn is that your DSN name with the . or is it something "fancy"

  3. #3
    Hmmm.... Guest

    Default You need the DSN path

    It looks like the DSN can&#039t be found because it&#039s in a different directory than the script that&#039s calling it and you haven&#039t specified a path.

  4. #4 body and soul Guest

    Default DSN path???

    paht of the DSN...that is not an issue here....i mean anywhere. Couly you please tell me where you can create a DSN.<BR><BR>I can think of only one place. How will you find the PHYSICAL path of a DSN

  5. #5
    Hmmmm...... Guest

    Default Will this work?

    ==&#062; Get server actual path (i.e. c:inetpubwwwroot...etc.)<BR> Dim sScriptDir<BR> sScriptDir = Request.ServerVariables("SCRIPT_NAME")<BR> sScriptDir = StrReverse(sScriptDir)<BR> sScriptDir = Mid(sScriptDir, InStr(1, sScriptDir, "/"))<BR> sScriptDir = StrReverse(sScriptDir)<BR> <BR>&#039==&#062; Set DSN path using server actual path above<BR> Dim sDSNPath, sDSN<BR> sDSNPath = Server.MapPath(sScriptDir) & "\"<BR> sDSN = "FileDSN=" & sDSNPath & sDSNFile & _<BR> ";DefaultDir=" & sDSNPath & _<BR> ";DBQ=" & sDSNPath & ";"

  6. #6
    Ol' Shady Mound Boy Guest

    Default Ain't anagrams fun!!!!

    I can think of two places to create DSNs. Test editor and ODBC Data Source administrator. It&#039s my understanding that if the DSN is created using the administrator, the path is not needed. However, if you create the DSN somewhere else and then moved the DSN file, or create it in a text editor (there&#039s an article on here somewhere about doing that) then you need the path. The code HMMMMwhatever posted would enable you to find the DSN if the DSN file was located in the same directory as the asp file.<BR><BR>However, this wouldn&#039t help in this instance because she said she created it on the server, which would imply she used ODBC to create it.<BR><BR>Or am I completely off base...

  7. #7
    dyobmit Guest

    Default RE: Data source name not found and no default driv

    did you really name your dsn &#039WomensSearch.dsn&#039 or just &#039WomensSearch&#039? <BR><BR>from the way you&#039ve named your files and variables it looks like maybe you got the code from one of the wrox asp books. i seem to remember working through one of those and having a problem and what fixed it was removing the &#039.dsn&#039 from the dsn name. i think one of the books does it that way in an example or two, if i remember correctly. of course i can&#039t find it now.<BR><BR>so have you tried taking off the &#039.dsn&#039 is basically what i&#039m asking.

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

    Default If i know i would tell you

    I honestly had not clue what you were talking about. I guess time to search for that article.

Posting Permissions

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