Solved

"ODBC driver key not found in Registry"

Posted on 1998-01-15
10
592 Views
Last Modified: 2013-12-28
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.
Thanks.
0
Comment
Question by:azaitchik
  • 6
  • 4
10 Comments
 
LVL 3

Accepted Solution

by:
biyiadeniran earned 100 total points
ID: 1789128
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.


0
 

Author Comment

by:azaitchik
ID: 1789129
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.


0
 
LVL 3

Expert Comment

by:biyiadeniran
ID: 1789130
AHi,
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
0
 

Author Comment

by:azaitchik
ID: 1789131
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.
/alan
0
 
LVL 3

Expert Comment

by:biyiadeniran
ID: 1789132
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.
0
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 

Author Comment

by:azaitchik
ID: 1789133
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.

0
 
LVL 3

Expert Comment

by:biyiadeniran
ID: 1789134
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.
0
 

Author Comment

by:azaitchik
ID: 1789135
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.
0
 

Author Comment

by:azaitchik
ID: 1789136
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.
0
 

Author Comment

by:azaitchik
ID: 1789137
The help was timely and easy to follow, although in the end I gave up on Access and decided to use MS SQLServer instead.
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Update 11/3/2014 - Although the below article will get you to relocate the WINSXS folder, Microsoft has finally released a utility to reduce the size of the WINSXS folder. For some reason, it's not that straightforward. It only works on Windows 2008…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This Micro Tutorial will give you a basic overview of Windows DVD Burner through its features and interface. This will be demonstrated using Windows 7 operating system.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now