Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to store information in the registry

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
i am saving the path of my db in a txt files.
this file only have:

c:\directory\mydb.mdb

my app read this file for locate the db...

how can store this information in the registry and read from my app.....

thank´s for any help

alejandro
 
hi,

the simplest way to do this is :

1/ GetSetting(name, section, key, def)
this call will read the entry
HKEY_CURRENT_USER\Software\VB and VBA Program Settings\name\section\key from the registry.

2/ SaveSetting (name, section, key, val)
this call will create or set (if key exist) the value to val in the entry
HKEY_CURRENT_USER\Software\VB and VBA Program Settings\name\section\key

 
you can do what Samir has sujested for you

but with Samir's method you can create/read/write keys in the registry under the HKEY_CURRENT_USER\Software\VB and VBA Program Settings key only

there is an other way to do that, it's complicated but useful :

goto this : you'll find a good thing about your question (i'm sure)

:)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top