none
32bit Win7 IIS7 AccessDB connection problem RRS feed

  • Question

  • Hi - I need to maintain a classic ASP website locally on Asus laptop, but cannot connect to the MsAccess database. Have tried every suggestion I could find on the net without success.

    My connection string is 

    ConnStr = "Driver={Microsoft Access Driver (*.mdb)};DBQ=" & Server.MapPath(DBFOLDER & DB)

     

    The error msg is

    [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
    Connstring Operation is not allowed when the object is closed.

     

    Any help or ideas will be most gratefully received.

    Thanks

    Ken Ashton

     

    Monday, September 12, 2011 12:29 AM

Answers

  • Hi Sheng & Paul. Thank you so much for your efforts. Paul, I already installed AccessDatabaseEngine immediately after enabling IIS7.

    I was trying very hard to avoid re-writing a client asp site in php, and needed Windows/IIS/ASP running to add some features to their site.

    Rightly or wrongly, I uninstalled IIS7 (well removed it as a 'windows feature' from control panel), rebooted, checked everything else was ok. I reselected the IIS feature, rebooted and now get a "Cannot start W3SVC service" error.

    But to be honest, its all to flaky and bizarre, I just can't put any more time into getting a simple server platform for ASP running on a new laptop.

    I sign off feeling guilty for your letting your time and effort go to waste, but it was greatly appreciated

    Many thanks

    • Edited by Ken Ashton Tuesday, September 13, 2011 8:38 PM typos
    • Marked as answer by Ken Ashton Tuesday, September 13, 2011 8:39 PM
    Tuesday, September 13, 2011 8:36 PM

All replies

  • Use procmon to check if you have any permission issues.

    The following is signature, not part of post
    Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
    Visual C++ MVP
    Monday, September 12, 2011 3:17 AM
  • Thanks for the starting point Sheng. Have downloaded procmon.  Not too sure on procedure yet, so I have started by filtering ProcessName/InetMngr, please let me know if this is wrong way to do it.

    Many thanks

    Monday, September 12, 2011 3:13 PM
  • You need set a filter as Path contains DBFOLDER and another to exclude SUCCESS results.

    Then you can tell which process failed to access the folder under which user account. Then you can grant the user required access to the folder.

     



    The following is signature, not part of post
    Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
    Visual C++ MVP
    Monday, September 12, 2011 7:57 PM
  • You need set a filter as Path contains DBFOLDER and another to exclude SUCCESS results.

    Then you can tell which process failed to access the folder under which user account. Then you can grant the user required access to the folder.

     



    The following is signature, not part of post
    Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
    Visual C++ MVP
    Monday, September 12, 2011 7:57 PM
  • Hello,

    IMO, I suggest you check if your connection string for ODBC Driver was correct or not. Please check this connectionstrings site for more information. http://www.connectionstrings.com/access-2007

    In addition, also double check if the passed file path value was valid.

    Hope this helps,

    Thanks,


    Larcolais Gong[MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.


    Tuesday, September 13, 2011 3:02 AM
  • Thanks Sheng.

    Tried your suggestion without any results, I don't think the process never gets as far as accessing anything in DBFOLDER because as the error suggests, it never finds a connection object.

    [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified

    Just so you know, the web site pages are not in the same partition as IIS7, but according to the docs, I have correctly pointed IIS7 to the site root  "D:\inetpub\wwwroot\"  rather than the usual  "C:\inetpub\wwwroot\"


    I had in fact already set the whole partition D:\ and child objects to total permissions for everyone (my dev pc), I also copied back the whole site to another XP/IIS6 pc to make sure I have not introduced any silly script errors, and it still runs perfectly on the XP/IIS6 PC.
    I've also installed the AccessDatabaseEngine from MS and  Office 2003, because I know that contains data access components, but nothing makes a difference. It still seems as though IIS7 fails to encounter a compatible ODBC object that it can use.

    I have also done the 'backwards compatibility' tests and changes, but no luck.

    So I dropped the filter, started capturing, called the url, and then stopped the capture.4
    I've cut out most of the 'success', PID and 'date' stuff from the procmon result and added it on the end of this message.

    If you get time to glance down it to see if you recognize what the problem may be, I will appreciate it.


    Thank you for your time an patience.

    Ken



    PROCMON results

    Everything before this was SUCCESS (mostly Firefox process calls) and here is where the page call got processed -

    ---------------
    w3wp.exe  QueryAllInformationFile  D:\inetpub\wwwroot\intechnetworks.es    BUFFER OVERFLOW    CreationTime: 10/09/2011 18:46:16, LastAccessTime: 13/09/2011 02:23:33, LastWriteTime: 13/09/2011 02:23:33, ChangeTime: 13/09/2011 02:23:33, FileAttributes: D, AllocationSize: 98,304, EndOfFile: 98,304, NumberOfLinks: 1, DeletePending: False, Directory: True, IndexNumber: 0xf9bf00000000f9bf, EaSize: 0, Access: Generic Read, Position: 0, Mode: Sequential Access, No Buffering, AlignmentRequirement: Word

    w3wp.exe  QueryOpen            D:\inetpub\wwwroot\intechnetworks.es\index.asp\web.config    PATH NOT FOUND
    ---------------

    I don't understand what would cause the BUFFER OVERFLOW above, on a 20kB page., or why IIS7 decides to look for
    D:\inetpub\wwwroot\intechnetworks.es\index.asp\web.config    I only have one file D:\inetpub\web.config, with one entry, to force index.asp rather than default.asp.  But, I don't think either of these are related to my problem, many Firefox/AVG processes continue from this point, all are successful until here.

    -----------
    w3wp.exe  RegOpenKey    HKU\S-1-5-17    NAME NOT FOUND    Desired Access: Maximum Allowed

    w3wp.exe  RegOpenKey    HKU\.Default    SUCCESS    Desired Access: Maximum Allowed, Granted Access: All Access

    w3wp.exe  RegOpenKey    HKU\.DEFAULT\Control Panel\International    SUCCESS    Desired Access: Read

    w3wp.exe  RegCloseKey    HKU\.DEFAULT    SUCCESS   

    w3wp.exe  RegQueryValue    HKU\.DEFAULT\Control Panel\International\LocaleName    SUCCESS    Type: REG_SZ, Length: 12, Data: en-GB

    w3wp.exe  RegCloseKey    HKU\.DEFAULT\Control Panel\International    SUCCESS   

    w3wp.exe  RegQueryKey    HKU\S-1-5-82-3006700770-424185619-1745488364-794895919-4004696415_CLASSES    SUCCESS    Query: Name
    -----------

    Then after various succesful processes, we apparently get more problems -

    -----------
    w3wp.exe  RegOpenKey    HKU\S-1-5-82-3006700770-424185619-1745488364-794895919-4004696415_CLASSES\CLSID    NAME NOT FOUND    Desired Access: Read
    w3wp.exe  RegOpenKey    HKCR\CLSID    SUCCESS    Desired Access: Read
    w3wp.exe  RegQueryKey    HKCR\CLSID    SUCCESS    Query: Name
    w3wp.exe  RegOpenKey    HKU\S-1-5-17_Classes\CLSID\{C8B522CB-5CF3-11CE-ADE5-00AA0044773D}    NAME NOT FOUND    Desired Access: Read
    w3wp.exe  RegOpenKey    HKCR\CLSID\{C8B522CB-5CF3-11CE-ADE5-00AA0044773D}    SUCCESS    Desired Access: Read
    w3wp.exe  RegCloseKey    HKCR\CLSID    SUCCESS   
    w3wp.exe  RegQueryKey    HKCR\CLSID\{c8b522cb-5cf3-11ce-ade5-00aa0044773d}    SUCCESS    Query: Name
    w3wp.exe  RegOpenKey    HKU\S-1-5-17_Classes\CLSID\{c8b522cb-5cf3-11ce-ade5-00aa0044773d}    NAME NOT FOUND    Desired Access: Maximum Allowed
    w3wp.exe  RegQueryValue    HKCR\CLSID\{c8b522cb-5cf3-11ce-ade5-00aa0044773d}\OLEDB_SERVICES    SUCCESS    Type: REG_DWORD, Length: 4, Data: 4294967295
    w3wp.exe  RegQueryKey    HKCR\CLSID\{c8b522cb-5cf3-11ce-ade5-00aa0044773d}    SUCCESS    Query: Name
    w3wp.exe  RegOpenKey    HKU\S-1-5-17_Classes\CLSID\{c8b522cb-5cf3-11ce-ade5-00aa0044773d}    NAME NOT FOUND    Desired Access: Maximum Allowed
    w3wp.exe  RegQueryValue    HKCR\CLSID\{c8b522cb-5cf3-11ce-ade5-00aa0044773d}\SPTimeOut    NAME NOT FOUND    Length: 144
    w3wp.exe  RegCloseKey    HKCR\CLSID\{c8b522cb-5cf3-11ce-ade5-00aa0044773d}    SUCCESS   
    w3wp.exe  RegOpenKey    HKU\S-1-5-82-3006700770-424185619-1745488364-794895919-4004696415\SOFTWARE\ODBC\ODBC.INI\Default    NAME NOT FOUND    Desired Access: Read
    w3wp.exe  RegOpenKey    HKLM\SOFTWARE\ODBC\ODBC.INI\Default    NAME NOT FOUND    Desired Access: Read
    w3wp.exe  RegQueryKey    HKU\S-1-5-82-3006700770-424185619-1745488364-794895919-4004696415_CLASSES    SUCCESS    Query: Name
    w3wp.exe  RegOpenKey    HKU\S-1-5-82-3006700770-424185619-1745488364-794895919-4004696415_CLASSES\CLSID\{C8B522CB-5CF3-11CE-ADE5-00AA0044773D}\ExtendedErrors    NAME NOT FOUND    Desired Access: Read
    w3wp.exe  RegOpenKey    HKCR\CLSID\{C8B522CB-5CF3-11CE-ADE5-00AA0044773D}\ExtendedErrors    SUCCESS    Desired Access: Read
    w3wp.exe  RegQueryKey    HKCR\CLSID\{c8b522cb-5cf3-11ce-ade5-00aa0044773d}\ExtendedErrors    SUCCESS    Query: Name
    w3wp.exe  RegOpenKey    HKU\S-1-5-17_Classes\CLSID\{c8b522cb-5cf3-11ce-ade5-00aa0044773d}\ExtendedErrors    NAME NOT FOUND    Desired Access: Maximum Allowed
    w3wp.exe  RegEnumKey    HKCR\CLSID\{c8b522cb-5cf3-11ce-ade5-00aa0044773d}\ExtendedErrors    SUCCESS    Index: 0, Name: {c8b522cc-5cf3-11ce-ade5-00aa0044773d}
    w3wp.exe  RegCloseKey    HKCR\CLSID\{c8b522cb-5cf3-11ce-ade5-00aa0044773d}\ExtendedErrors    SUCCESS   
    w3wp.exe  RegQueryKey    HKU\S-1-5-82-3006700770-424185619-1745488364-794895919-4004696415_CLASSES    SUCCESS    Query: Name
    w3wp.exe  RegOpenKey    HKU\S-1-5-82-3006700770-424185619-1745488364-794895919-4004696415_CLASSES\CLSID\{0000051A-0000-0010-8000-00AA006D2EA4}\ExtendedErrors    NAME NOT FOUND    Desired Access: Read
    w3wp.exe  RegOpenKey    HKCR\CLSID\{0000051A-0000-0010-8000-00AA006D2EA4}\ExtendedErrors    SUCCESS    Desired Access: Read
    w3wp.exe  RegQueryKey    HKCR\CLSID\{0000051A-0000-0010-8000-00AA006D2EA4}\ExtendedErrors    SUCCESS    Query: Name
    w3wp.exe  RegOpenKey    HKU\S-1-5-17_Classes\CLSID\{0000051A-0000-0010-8000-00AA006D2EA4}\ExtendedErrors    NAME NOT FOUND    Desired Access: Maximum Allowed
    w3wp.exe  RegEnumKey    HKCR\CLSID\{0000051A-0000-0010-8000-00AA006D2EA4}\ExtendedErrors    SUCCESS    Index: 0, Name: {00000542-0000-0010-8000-00AA006D2EA4}
    w3wp.exe  RegCloseKey    HKCR\CLSID\{0000051A-0000-0010-8000-00AA006D2EA4}\ExtendedErrors    SUCCESS   
    w3wp.exe  CloseFile    D:\inetpub\wwwroot\intechnetworks.es    SUCCESS   
    firefox.exe  WriteFile    C:\Users\Ken\AppData\Local\Mozilla\Firefox\Profiles\yjuh6f6f.default\Cache\_CACHE_001_    SUCCESS    Offset: 20,224, Length: 201, Priority: Normal
    -------------

    No further errors after this point

    Tuesday, September 13, 2011 3:03 AM
  • I was about to suggest adding a Provider=MSDASQL; to the connection string but it looks like the process is looking for MSDASQL.1 and found unde HKR. Probably it has something to do with WOW file system virualization. You can  use the 32bit ODBC administrator at %windir%\SysWOW64\odbcad32.exe to create a file DSN, test if you can use a file DSN to connect to the database, and if you can, open the file DSN in notepad to see the connection settings.

    The following is signature, not part of post
    Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
    Visual C++ MVP
    Tuesday, September 13, 2011 3:25 AM
  • Hi Sheng - I have just checked my registry, to see why the NAME NOT FOUND errors in procmon occurred, and now realize the entries don't even exist in the registry, and hence it is the registry entry NAME that is missing, rtaher than the content.

    How can any normally intelligent person be expected to deal with this stuff. This is a brand new install of windows 7 on a brand new pc and a subsequent install of the current version of IIS7.

    The whole thing is the typical MS total screw up - it just doesn't work for anyone that needs anything more than emails, messenger and facebook (end of rant, lol).

    So, I feel I probably have a basic installation problem, not of my making, but don't know how else to install this stuff, you carefully follow all the instructions at install time and finish up with what I have, on too many occassions.

    If you do have any thoughts, I will appreciate them, I do value you your time.

    Thanks mate

    Ken

     

     

    Tuesday, September 13, 2011 3:45 AM
  • those name not found logs do not necessary indicate a problem - it would be a problem only if all search paths are exhausted, which is not the case here,

    The following is signature, not part of post
    Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
    Visual C++ MVP
    Tuesday, September 13, 2011 4:25 AM
  • I can't recommend using the Access ODBC driver. Instead, use the ACE OLEDB Provider connection string from the link posted by Larcolais. You can download the ACE OLEDB Provider from the below link if required:

    http://www.microsoft.com/download/en/details.aspx?id=13255

     


    Paul ~~~~ Microsoft MVP (Visual Basic)
    Tuesday, September 13, 2011 2:37 PM
  • Hi Sheng & Paul. Thank you so much for your efforts. Paul, I already installed AccessDatabaseEngine immediately after enabling IIS7.

    I was trying very hard to avoid re-writing a client asp site in php, and needed Windows/IIS/ASP running to add some features to their site.

    Rightly or wrongly, I uninstalled IIS7 (well removed it as a 'windows feature' from control panel), rebooted, checked everything else was ok. I reselected the IIS feature, rebooted and now get a "Cannot start W3SVC service" error.

    But to be honest, its all to flaky and bizarre, I just can't put any more time into getting a simple server platform for ASP running on a new laptop.

    I sign off feeling guilty for your letting your time and effort go to waste, but it was greatly appreciated

    Many thanks

    • Edited by Ken Ashton Tuesday, September 13, 2011 8:38 PM typos
    • Marked as answer by Ken Ashton Tuesday, September 13, 2011 8:39 PM
    Tuesday, September 13, 2011 8:36 PM
  • I would recommend posting a new question and providing the relevant information (e.g. code example, errors, etc.).
    Paul ~~~~ Microsoft MVP (Visual Basic)
    Wednesday, October 12, 2011 4:28 PM