Can't read Registry on NT

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

DRB2k2

Thread Starter
Joined
Feb 7, 2005
Messages
1
Hi all,
I've written a program that works perfectly on win 95/98 2000/XP
However it never works on NT.
The main problem seems to be security related.
I'm trying to read a registry entry that points to a database location, and then connect to that database with a TADOConnection (BORLAND object).

The reg query looks like this
Code:
if RegOpenKeyEx(HKEY_LOCAL_MACHINE,'SOFTWARE\\My PRog\\My prog Demonstration Beta 1.1',0,KEY_QUERY_VALUE,Result2)=ERROR_SUCCESS then
if RegQueryValueEx(Result2,'MainDBPath',nil,@aType,@aTmp,@aCb)=ERROR_SUCCESS then
...
It always fails on the open key value call.
I've tried to get around this for the moment by specifying the database path directly.

However, then my TADOConnection call fails with the message "Access Denied".
All it does is TADOCOnnection.connect

Has anyone encountered this before? or are there some simple program permissions that I need to enable?

Any help would be much appreciated.

Cheers
DRB2k2 :confused:
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Staff online

Top