1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Can't read Registry on NT

Discussion in 'Windows XP' started by DRB2k2, Feb 7, 2005.

Thread Status:
Not open for further replies.
  1. DRB2k2

    DRB2k2 Thread Starter

    Feb 7, 2005
    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
    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.

    DRB2k2 :confused:
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 733,556 other people just like you!

Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/327694

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice