473,385 Members | 1,983 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Problems with Registry Functions under A2002

I am getting and setting registry values successfully with two functions
from
the Getz/Litwin/Gilbert book: adh_accRegGetVal and adh_accRegWriteVal.

I have two cases now where these do not work under Access 2002. There is
no error, the GetKey function based on adh_accRegGetVal simply returns a
zero length string every time.

In both cases the PC also had the 97 Runtime installed on them. Would this
cause a conflict in this area? I have 97 and 2000 on my PC and the
functions work just fine and on every other machine I've tested except
those with Access 2002.
--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
Nov 13 '05 #1
6 1609
I don't have copies of that code handy, but I can't imagine any reason why
having the 97 runtime would affect the use of an OS API call. Are you sure
the key actually exists on the machine(s) in question?

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

"Rick Brandt" <ri*********@hotmail.com> wrote in message
news:2p************@uni-berlin.de...
I am getting and setting registry values successfully with two functions
from
the Getz/Litwin/Gilbert book: adh_accRegGetVal and adh_accRegWriteVal.

I have two cases now where these do not work under Access 2002. There is
no error, the GetKey function based on adh_accRegGetVal simply returns a
zero length string every time.

In both cases the PC also had the 97 Runtime installed on them. Would this cause a conflict in this area? I have 97 and 2000 on my PC and the
functions work just fine and on every other machine I've tested except
those with Access 2002.
--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com

Nov 13 '05 #2
"Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message
news:2Q*******************@news01.bloor.is.net.cab le.rogers.com...
I don't have copies of that code handy, but I can't imagine any reason why
having the 97 runtime would affect the use of an OS API call. Are you sure
the key actually exists on the machine(s) in question?


Yeah, they're definitely there. My concern is that the API reference is to
MSAccess.exe. What exactly does this reference mean when there are multiple
versions of Access installed? Is it "the last one used" like the file
registration and if so, should any/all of them work the same way?

Nov 13 '05 #3
"Rick Brandt" <ri*********@hotmail.com> wrote in message
news:2p************@uni-berlin.de...
"Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in message
news:2Q*******************@news01.bloor.is.net.cab le.rogers.com...
I don't have copies of that code handy, but I can't imagine any reason why having the 97 runtime would affect the use of an OS API call. Are you sure the key actually exists on the machine(s) in question?
Yeah, they're definitely there. My concern is that the API reference is

to MSAccess.exe. What exactly does this reference mean when there are multiple versions of Access installed? Is it "the last one used" like the file
registration and if so, should any/all of them work the same way?


As I said, I don't have a copy of the code, so I don't know the
declarations. If all that's there is msaccess.exe, I'm not sure which one
it'll pick. I would assume that it looks in all of the normal places
(Windows, System, Current Directory, Path, etc) to find the file, but the
order in which it searches can vary from OS to OS.

Having said that, though, there are obviously ways of working with the
registry that don't involve msaccess.exe. I've used the code at
http://www.thescarms.com/vbasic/registry.asp myself several times.

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)


Nov 13 '05 #4
"Rick Brandt" <ri*********@hotmail.com> wrote:
I am getting and setting registry values successfully with two functions
from
the Getz/Litwin/Gilbert book: adh_accRegGetVal and adh_accRegWriteVal.

I have two cases now where these do not work under Access 2002. There is
no error, the GetKey function based on adh_accRegGetVal simply returns a
zero length string every time.


I don't know the code. However I did have a problem recently where a person with
User permissions couldn't open a registry key. Turns out the problem was that my
code was, by default, attempting to open the key with read/write privileges. Which
Users aren't allowed to do in that area of the registry. Changing the open to read
made the reading of the registry work just fine.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Nov 13 '05 #5
"Rick Brandt" <ri*********@hotmail.com> wrote in
news:2p************@uni-berlin.de:
"Douglas J. Steele" <NOSPAM_djsteele@NOSPAM_canada.com> wrote in
message
news:2Q*******************@news01.bloor.is.net.cab le.rogers.com...
I don't have copies of that code handy, but I can't imagine any
reason why having the 97 runtime would affect the use of an OS
API call. Are you sure the key actually exists on the machine(s)
in question?


Yeah, they're definitely there. My concern is that the API
reference is to MSAccess.exe. What exactly does this reference
mean when there are multiple versions of Access installed? Is it
"the last one used" like the file registration and if so, should
any/all of them work the same way?


There's only one registered MSAccess at any one time. If you use
both A97 and a later version of Access and you've not neutered the
relevant *.srg files (instructions on MichKa's website,
http://trigeminal.com), then the registration of the handler for
Access files will repeatedly switch back and forth. If you *have*
neutered the A97 *.srg files, the default association will be with
your later version of Access.

So, you really can't use that as the basis for knowing which version
of Access to use.

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc
Nov 13 '05 #6
"David W. Fenton" <dX********@bway.net.invalid> wrote in message
news:Xn**********************************@24.168.1 28.86...
"Rick Brandt" <ri*********@hotmail.com> wrote in
news:2p************@uni-berlin.de:

There's only one registered MSAccess at any one time. If you use
both A97 and a later version of Access and you've not neutered the
relevant *.srg files (instructions on MichKa's website,
http://trigeminal.com), then the registration of the handler for
Access files will repeatedly switch back and forth. If you *have*
neutered the A97 *.srg files, the default association will be with
your later version of Access.

So, you really can't use that as the basis for knowing which version
of Access to use.


I guess that brings me back to the original question. If the API reference
is...

Declare Function adh_accRegGetVal Lib "msaccess.exe" Alias "#70" (ByVal
hkeyRoot As Long, ByVal strSubKey As String, ByVal strValName As String,
lpData As Any, ByVal lngMaxLen As Long) As Long

....should it make any difference which "msaccess.exe" is being referenced?
Shouldn't *any* of them work the same regarding the adh_accRegGetVal
function? Again, on my PC I have both A97 and A2K and I can switch between
those all I want and the function works just fine.

I guess I need to see if I can find a PC that has Access 2002 *only* and
see if the function works there. I really haven't determined that having
more than one version is related to the problem at all and frankly I
suspect that it is not.
--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
Nov 13 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

19
by: Gerson Kurz | last post by:
AAAAAAAARG I hate the way python handles unicode. Here is a nice problem for y'all to enjoy: say you have a variable thats unicode directory = u"c:\temp" Its unicode not because you want it...
4
by: David | last post by:
Hi, I want to work with Access 2002. I will need to be able to distribute my application to users that may still have access 2000 on their computers. I know access 2002 has a function that...
1
by: Richard Holliingsworth | last post by:
Hello: Thanks for reading this. We just converted to A2002 and some of my querries have stopped working and I can't figure out why. Basically, anything with a "NOT" is not working. For...
1
by: Paul Drabik | last post by:
I have an app written in A97. I also have sporatic users upgrading to A2002 as they get XP on the machines. So they need to open my A97 app. To do so, of course, I open the MDB exclusively to...
1
by: Rob Parker | last post by:
I posted this (with a different subjetc line) in the ms.public.access.forms newsgroup a few days ago, but haven't had a single response there. I'm hoping maybe someone here can help. Using...
1
by: Rob Parker | last post by:
I posted this with a different subject line (in two posts - I added additional info in the second) in this newsgroup a few days ago, but haven't had a single response. Hopefully, that was because...
4
by: James | last post by:
I have a VB windows forms application that accesses a Microsoft Access database that has been secured using user-level security. The application is being deployed using No-Touch deployment. The...
6
by: tombsy | last post by:
Hello Group. I work for a company who is about to embark on a long awaited Office upgrade from Office 97 to Office XP. Office XP comes with Access 2002. I am an accomplished Access developer...
0
by: Tom | last post by:
All: I posted on this yesterday, but for whatever reason, Google isn't dealing nicely with it... Anyway, I need to install A2000 on a computer that already has A2002 so I can create A2000 mde...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.