Temp folder location for ACE/JET ODBC driver for Excel/Access

J

Joe Schluter

The ACE/JET drivers expect that there is a Temp folder before it can do any
work. Usually, this is not an issue. However, if the app calling ACE is
running as a Windows Service (using the SYSTEM account) on a 64-bit XP PC
(using WOW, Windows-on-Windows), the required Temp folder may not exist, as
system32\config\systemprofile is redirected to SysWOW64\config\systemprofile.

I need to ascertain where the Temp folder is expected by ACE, so I can
create it if it's not already there. I've used different approaches to find
the Temp folder location (GetTempPath, SHGetFolderPath, SHGetKnownFolderPath,
"Shell Folders" regsitry entry and "Environment" registry entry together with
the USERPROFILE environment variable). Again, these all work fine for regular
users, but when called under SYSTEM, all these methods return different
locations for the Temp folder (and they're not even consistent between XP,
Vista and Windows 7).

So, my question: How does the ACE driver determine the location of the temp
folder? If the folder doesn't exist, any ACE request will result in:

ERROR: CLI error trying to establish connection: [Microsoft][ODBC Microsoft
Access Driver] Your network access was interrupted. To continue, close the
database, and then open it again.

Thanks for any help!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top