"ODBC driver key not found in Registry"

I am trying to use IDC and HTX to access dat ain an Access database. I set things up just like the on line help says to do, but I get the error message
I built a simple Access database and constructed a simple IDC file and HTX file for use with IIS. I get the following error message, however, when accessing the IDX file:
[State=S1000][Error=51][Microsoft][ODBC Driver pack 2.0 Driver]General error Unable to open registry key 'DriverId'.
When installing IIS I took the complete installation option and under ODBC in the Settings window I see the Access database in question with a System DSN.
I am unclear what my next step should be, being rather unfamiliar with the Registry and NT diagnostic tools.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

This can be caused by one of two reasons.
  - The key for this datasource has a permission restriction applied.
  - The key for the datasource does not have the appropriate subkey values added. This can be caused by a corrupt key or the subkey is missing.
 The key location is:
HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\Access_data_source_name\Engines\Jet 2.x

If the key for this datasource has a permission restriction applied, make sure the user who is logging into the database has read and execute permissions to the datasource key.
If the key for the datasource does not have the appropriate subkey values added. The Access_data_source_name will exist, but the other subkey will not be there. If you delete the datasource from the ODBC Manager, the entry may remain in the registry. You may have to remove the entire entry of the Datasource from the registry manually and then add a new datasource from the ODBC Manager.

Be very careful when using Registry editor. I will suggest you make a backup copy of the registry by exporting it.

Use regedt32.exe to grant everyone read permission to that key.

Hope this fixes your problem.


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
azaitchikAuthor Commented:
I'm afraid I need just a little more help... In the Registry I see the key HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\MyTest1
("MyTest1" is the name of the database, i.e. its system DSN, as well as its filename...)
and I also see its value
Driver: REG_SZ: C:\WINNT\System32\odbcjt32.dll
I do not see any subkey
\Engines\Jet 2.x
The thing is, even after removing the database in the ODBC manager of Settings and adding it back I do not see it. Should I add this manually? I have an older version of "Access for Windows 95 version 7.0" running on my system which is NT server 4.0 SP3. I recently re-installed the Microsoft IIS with ODBC option by first rolling back to SP2, then installing IIS from the NT 4.0 distribution, and then re-applying SP3. (This is the sequence I was told to use.) Is it possible I am now in version-mismatch trouble? Sorry I didn't give you all these details up front but I didn't think they would be relevant, and now I am wondering.

After removing the database in the ODBC manager of Settings did you go to check the registry to see if it is still there. If it is there remove it manually. then add it back. Let us take it from there
Introduction to Web Design

Develop a strong foundation and understanding of web design by learning HTML, CSS, and additional tools to help you develop your own website.

azaitchikAuthor Commented:
Thanks so much for your helpful suggestions. I repeated my earlier remove-add and indeed I now see the subkeys in the registry! I am not sure why it worked this time and not the previous time...

Anyway, I wish I could say that all is well but: I now get the error message:

[State=S1000][Error=-1811][Microsoft][ODBC Microsoft Access 7.0 Driver] Couldn't find file 'C:\WINNT\system32\pttest1.md'.

which is looking for the database in the wrong place and with the wrong filetype extension! I rechecked the ODBC dialogue boxes under Settings, and the Database (as well as the "defaultDir") correctly point to pttest1.mdb in D:\pttest\ptdata. I could not see anything obviously wrong in the Registry, either.

Do you have a suggestion as to what I should check/do next?
As ever, thank you for your (speedy!) help.
The only time I have seen this type of error is with WINS/DHCP and what was done to fix it was to copy the file to that location try copying you mdb to where it is looking for it and lets see what happens. If it will see it there. This is not a very good solution but it is for troubleshooting.
azaitchikAuthor Commented:
Well, I found that I was causing some problems by having failed to remove from the User "DSN" (in ODBC contol panel) a similarly named data source. Sorry to have failed to notice that earlier.
It is possible that the directory paths were not set up correctly for that data source, which is why the system looked in C:\winnt\system32 ?? Anyway, I now get the following error message:
State=S1000][Error=51][Microsoft][ODBC Microsoft Access 7.0 Driver]General error Not enough information to connect to this DSN with SQLConnect. Use SQLDriverConnect.
I get this with the mdb file located in the system32 dirctory or located in the correct location where I want it, either way.
Related point: perhaps I am specifying the driver or defaultDirectory incorrectly in the ODBC "configure>advanced" control panel dialogue? Specifically, if the data file is pttest1.mdb and it lives in D:\PTtest\PTdata, should default Dir not be just D:\PTtest\PTdata? That is what I assumed, but I notice that some other entries created by software that was successfully installed earlier actually had the mdb file specified as part of the defaultDir path. That is, in my case it would be
D:\PTtest\PTdata\pttest1.mdb. I also tried specifying defaultDir this way but with no better luck.
Also: I tried specifying the driver as c:\winnt\system32\odbcjt32.dll and also left it blank, with no luck.
If I am abusing your good will and the unspoken parameters of using this service, please let me know. I want you to know that I very much appreciate your time and efforts! I am really stuck.

does the \Engines\Jet 2.x subkey exist in your registry key? if not you may have to add try the first answer I submitted again and that should hopefully fix it the error message is familiar.
I don't think you are abusing good will. I'm willing to help anyhow.
cheers and all the best. Hope to hear from you soon.
azaitchikAuthor Commented:
The Engines\Jet2.x subkey does exist! The value are:
Driver: REG_SZ: C\WINNT\System32\odbcjt32.dll
MaxBufferSize: REG_DWORD: 0x200
PageTimeout: REG_DWORD: 0x258
I believe that I manually entered the driver name when I used the ODBC Control Panel dialogue (in the the Configure>Advanced dialogue).
Is it possible that I have a version incompatibility? What is the additional information which I am not supplying? Maybe it should be in the IDC file rather than in the configuration...
Thanks, as ever, for any help you can give.
azaitchikAuthor Commented:
In the end I gave up and went over to SQL Server. I am now able to access data using IDC and HTX. I am not sure what the original problem was, but it is now moot.
Thanks for your help.
azaitchikAuthor Commented:
The help was timely and easy to follow, although in the end I gave up on Access and decided to use MS SQLServer instead.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows OS

From novice to tech pro — start learning today.