« Previous Next »

Answered Thread: ASP & Access 4005 error: defining 32 bit dsn on 64 bit windows

Last post 10-31-2009 3:46 AM by timpollard. 6 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (7 items)

Sort Posts:

  • 10-30-2009, 5:55 AM

    ASP & Access 4005 error: defining 32 bit dsn on 64 bit windows

    Hi

    I'm having trouble making classic asp with access db work on Windows 7. On one box I have it all working fine on a 32 bit W7 Pro install, but on my main development server I am using 64 bit W7Pro and this one still doesn't work.

     On both machines I have used the icacls workaround to grant appropriate permissions on the Users/Useraccount/AppData/Local/Temp folder, have also fiven that folder permissions for the IUSR account, and the same for the folder which contains the db. This worked for the 32 bit machine, but not the 64.

    I then used the Process Monitor to trace w3wp.exe and discovered, if I'm reading the log file right, that the problem is that w7 64 bit can't find the dsn.

     When I set up the dsn I went first to the default ODBC Admin console, only to find that in a 64 bit OS this only offers 64 bit drivers. I googled that and found that there is a legacy 32 bit version, which I used to create the dsn. However, although it appears to be there when viewed in the 32 bit ODBC Console, the 64 bit OS doesn't seem to recognise it.

    Can anyone help, please?

     The log file is below. I've highlighted the line which appears to suggest it can't find the dsn.

    Tim

    "Time of Day","Process Name","PID","Operation","Path","Result","Detail"
    "09:34:39.4159347","w3wp.exe","7960","CreateFile","D:\My Documents\Web sites\dollman","SUCCESS","Desired Access: Generic Read, Disposition: Open, Options: Sequential Access, No Buffering, Attributes: RE, ShareMode: Read, Write, Delete, AllocationSize: n/a, Impersonating: NT AUTHORITY\IUSR, OpenResult: Opened"
    "09:34:39.4159860","w3wp.exe","7960","QueryAllInformationFile","D:\My Documents\Web sites\dollman","BUFFER OVERFLOW","CreationTime: 28/02/2009 17:13:45, LastAccessTime: 21/04/2009 14:00:19, LastWriteTime: 21/04/2009 14:00:19, ChangeTime: 21/04/2009 14:00:19, FileAttributes: D, AllocationSize: 8,192, EndOfFile: 8,192, NumberOfLinks: 1, DeletePending: False, Directory: True, IndexNumber: 0x2000000013675, EaSize: 0, Access: Generic Read, Position: 0, Mode: Sequential Access, No Buffering, AlignmentRequirement: Word"
    "09:34:39.4160668","w3wp.exe","7960","CreateFile","D:\My Documents\Web sites\dollman\DEFAULT.HTM","NAME NOT FOUND","Desired Access: Generic Read, Disposition: Open, Options: Sequential Access, Attributes: RE, ShareMode: Read, Write, Delete, AllocationSize: n/a, Impersonating: NT AUTHORITY\IUSR"
    "09:34:39.4161531","w3wp.exe","7960","CreateFile","D:\My Documents\Web sites\dollman\default.asp","SUCCESS","Desired Access: Generic Read, Disposition: Open, Options: Sequential Access, Attributes: RE, ShareMode: Read, Write, Delete, AllocationSize: n/a, Impersonating: NT AUTHORITY\IUSR, OpenResult: Opened"
    "09:34:39.4163917","w3wp.exe","7960","QueryAllInformationFile","D:\My Documents\Web sites\dollman\default.asp","BUFFER OVERFLOW","CreationTime: 28/02/2009 17:13:45, LastAccessTime: 28/02/2009 17:13:45, LastWriteTime: 06/11/2008 09:39:08, ChangeTime: 29/10/2009 15:01:48, FileAttributes: A, AllocationSize: 24,576, EndOfFile: 23,009, NumberOfLinks: 1, DeletePending: False, Directory: False, IndexNumber: 0x200000001367f, EaSize: 0, Access: Generic Read, Position: 0, Mode: Sequential Access, AlignmentRequirement: Word"
    "09:34:39.4164733","w3wp.exe","7960","CreateFile","D:\My Documents\Web sites\dollman","SUCCESS","Desired Access: Read Data/List Directory, Read Attributes, Synchronize, Disposition: Open, Options: , Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened"
    "09:34:39.4165243","w3wp.exe","7960","NotifyChangeDirectory","D:\My Documents\Web sites\dollman","","Filter: FILE_NOTIFY_CHANGE_FILE_NAME, FILE_NOTIFY_CHANGE_DIR_NAME, FILE_NOTIFY_CHANGE_ATTRIBUTES, FILE_NOTIFY_CHANGE_SIZE, FILE_NOTIFY_CHANGE_LAST_WRITE, FILE_NOTIFY_CHANGE_CREATION, FILE_NOTIFY_CHANGE_EA, FILE_NOTIFY_CHANGE_SECURITY, FILE_NOTIFY_CHANGE_STREAM_NAME, FILE_NOTIFY_CHANGE_STREAM_SIZE, FILE_NOTIFY_CHANGE_STREAM_WRITE"
    "09:34:39.4165519","w3wp.exe","7960","ReadFile","D:\My Documents\Web sites\dollman\default.asp","SUCCESS","Offset: 0, Length: 23,009, Priority: Normal"
    "09:34:39.4165933","w3wp.exe","7960","QuerySecurityFile","D:\My Documents\Web sites\dollman\default.asp","SUCCESS","Information: Owner, Group, DACL"
    "09:34:39.4166178","w3wp.exe","7960","CloseFile","D:\My Documents\Web sites\dollman\default.asp","SUCCESS",""
    "09:34:39.4167040","w3wp.exe","7960","QueryOpen","D:\My Documents\Web sites\dollman\Default.asp\web.config","PATH NOT FOUND",""
    "09:34:39.4169856","w3wp.exe","7960","RegOpenKey","HKU\S-1-5-17","NAME NOT FOUND","Desired Access: Maximum Allowed"
    "09:34:39.4170093","w3wp.exe","7960","RegOpenKey","HKU\.Default","SUCCESS","Desired Access: Maximum Allowed, Granted Access: Read"
    "09:34:39.4170545","w3wp.exe","7960","RegOpenKey","HKU\.DEFAULT\Control Panel\International","SUCCESS","Desired Access: Read"
    "09:34:39.4170794","w3wp.exe","7960","RegCloseKey","HKU\.DEFAULT","SUCCESS",""
    "09:34:39.4170978","w3wp.exe","7960","RegQueryValue","HKU\.DEFAULT\Control Panel\International\LocaleName","SUCCESS","Type: REG_SZ, Length: 12, Data: en-GB"
    "09:34:39.4171216","w3wp.exe","7960","RegCloseKey","HKU\.DEFAULT\Control Panel\International","SUCCESS",""
    "09:34:39.4174813","w3wp.exe","7960","RegQueryKey","HKU\.DEFAULT","SUCCESS","Query: HandleTags, HandleTags: 0x0"
    "09:34:39.4175101","w3wp.exe","7960","RegOpenKey","HKU\.DEFAULT\SOFTWARE\ODBC\ODBC.INI\dsnDollman","NAME NOT FOUND","Desired Access: Read"
    "09:34:39.4175380","w3wp.exe","7960","RegQueryKey","HKLM","SUCCESS","Query: HandleTags, HandleTags: 0x0"
    "09:34:39.4175629","w3wp.exe","7960","RegOpenKey","HKLM\SOFTWARE\ODBC\ODBC.INI\dsnDollman","NAME NOT FOUND","Desired Access: Read"
    "09:34:39.4175917","w3wp.exe","7960","RegQueryKey","HKU\.DEFAULT","SUCCESS","Query: HandleTags, HandleTags: 0x0"
    "09:34:39.4176173","w3wp.exe","7960","RegOpenKey","HKU\.DEFAULT\SOFTWARE\ODBC\ODBC.INI\Default","NAME NOT FOUND","Desired Access: Read"
    "09:34:39.4176422","w3wp.exe","7960","RegQueryKey","HKLM","SUCCESS","Query: HandleTags, HandleTags: 0x0"
    "09:34:39.4176668","w3wp.exe","7960","RegOpenKey","HKLM\SOFTWARE\ODBC\ODBC.INI\Default","NAME NOT FOUND","Desired Access: Read"
    "09:34:39.4176947","w3wp.exe","7960","RegQueryKey","HKU\.DEFAULT","SUCCESS","Query: HandleTags, HandleTags: 0x0"
    "09:34:39.4177189","w3wp.exe","7960","RegOpenKey","HKU\.DEFAULT\SOFTWARE\ODBC\ODBC.INI\ODBC Data Sources","NAME NOT FOUND","Desired Access: Query Value"
    "09:34:39.4177434","w3wp.exe","7960","RegQueryKey","HKLM","SUCCESS","Query: HandleTags, HandleTags: 0x0"
    "09:34:39.4177671","w3wp.exe","7960","RegOpenKey","HKLM\SOFTWARE\ODBC\ODBC.INI\ODBC Data Sources","NAME NOT FOUND","Desired Access: Query Value"
    "09:34:39.4177917","w3wp.exe","7960","RegQueryKey","HKLM","SUCCESS","Query: HandleTags, HandleTags: 0x0"
    "09:34:39.4178215","w3wp.exe","7960","RegOpenKey","HKLM\SOFTWARE\Wow6432Node\ODBC\ODBC.INI\ODBC Data Sources","SUCCESS","Desired Access: Read"
    "09:34:39.4178568","w3wp.exe","7960","RegSetInfoKey","HKLM\SOFTWARE\Wow6432Node\ODBC\ODBC.INI\ODBC Data Sources","SUCCESS","KeySetInformationClass: KeySetHandleTagsInformation, Length: 0"
    "09:34:39.4178813","w3wp.exe","7960","RegQueryValue","HKLM\SOFTWARE\Wow6432Node\ODBC\ODBC.INI\ODBC Data Sources\dsnDollman","SUCCESS","Type: REG_SZ, Length: 64, Data: Microsoft Access Driver (*.mdb)"
    "09:34:39.4179169","w3wp.exe","7960","RegCloseKey","HKLM\SOFTWARE\Wow6432Node\ODBC\ODBC.INI\ODBC Data Sources","SUCCESS",""
    "09:34:39.4179802","w3wp.exe","7960","RegQueryKey","HKCR","SUCCESS","Query: HandleTags, HandleTags: 0x0"
    "09:34:39.4180058","w3wp.exe","7960","RegOpenKey","HKCR\CLSID\{C8B522CB-5CF3-11CE-ADE5-00AA0044773D}\ExtendedErrors","SUCCESS","Desired Access: Read"
    "09:34:39.4180372","w3wp.exe","7960","RegEnumKey","HKCR\CLSID\{C8B522CB-5CF3-11CE-ADE5-00AA0044773D}\ExtendedErrors","SUCCESS","Index: 0, Name: {c8b522cc-5cf3-11ce-ade5-00aa0044773d}"
    "09:34:39.4180794","w3wp.exe","7960","RegCloseKey","HKCR\CLSID\{C8B522CB-5CF3-11CE-ADE5-00AA0044773D}\ExtendedErrors","SUCCESS",""
    "09:34:39.4184591","w3wp.exe","7960","CloseFile","D:\My Documents\Web sites\dollman","SUCCESS",""

  • 10-30-2009, 6:31 AM In reply to

    • lextm
    • Top 10 Contributor
    • Joined on 10-22-2008, 4:18 AM
    • Shanghai, PRC
    • Posts 1,423

    Re: ASP & Access 4005 error: defining 32 bit dsn on 64 bit windows

    There is no x64 driver for Access. So please consider migrating to SQL Server.

    A workaround is to configure the application pool to run under 32 bit.

     

    Lex Li
    Support Engineer at Microsoft
    ---------------------------
    This posting is provided "AS IS" with no warranties, and confers no rights.
  • 10-30-2009, 8:46 AM In reply to

    Re: ASP & Access 4005 error: defining 32 bit dsn on 64 bit windows

    Hi lextm - thanks for the reply.

     I mostly do use SQL Server, but I also look after some old legacy web sites for small businesses, who are only using the db for minor content management system changes. They are insignificantly tiny dbs (mostly a few hundred kb) which are not worth upgrading to sql server - not to mention the fact that the customers won't be interested in paying me to upgrade their site nor want to pay the £15 per month my host will charge me for the extra SQL Server dbs.

    I just need them working on my test environment in case any minor amends are requested.

    So I'm going to have to go with the workaround. How do you configure the application pool to run in 32 bit, please - can you do this on a per virtual directory basis?

     Thanks again for your help.

  • 10-30-2009, 9:10 AM In reply to

    Re: ASP & Access 4005 error: defining 32 bit dsn on 64 bit windows

    Hi,

    If these are light use and relatively small databases you could use SQL 2008 Express.

    http://www.microsoft.com/sqlserver/2008/en/us/express.aspx

    Regards,

    Paul Lynch | www.iisadmin.co.uk
  • 10-30-2009, 9:55 AM In reply to

    Re: ASP & Access 4005 error: defining 32 bit dsn on 64 bit windows

    Hi Paul

    Thanks for the reply.

    Sadly my host, with whom the public version of each of these sites are hosted, only allows either Access for free or SQL Server 2008 full version at £17 per db per month. The public sites work quite happily with Access, so I just need to get the test versions working.

     Thanks anyway.

  • 10-30-2009, 8:55 PM In reply to

    • lextm
    • Top 10 Contributor
    • Joined on 10-22-2008, 4:18 AM
    • Shanghai, PRC
    • Posts 1,423

    Answered Re: ASP & Access 4005 error: defining 32 bit dsn on 64 bit windows

    To configure a pool to run in 32-bit mode,

    1. Open IIS Manager.

    2. Click Application Pools from the left panel.

    3. Choose the application pool in the middle panel.

    4. Choose Advanced Settings in the right panel.

    5. Set enable 32-bit applications to true.

    Lex Li
    Support Engineer at Microsoft
    ---------------------------
    This posting is provided "AS IS" with no warranties, and confers no rights.
  • 10-31-2009, 3:46 AM In reply to

    Re: ASP & Access 4005 error: defining 32 bit dsn on 64 bit windows

    Lovely! That's fixed it.

    Many thanks for your help.

    Regards

    Tim

Page 1 of 1 (7 items)
Microsoft Communities