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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can I create an INI file and retrieve values from it in Access? 1

Status
Not open for further replies.

Manny64

Technical User
May 1, 2001
16
0
0
CA
I have an application where the back-end resides on a networked workstation, and the front-end resides on up to 20 other workstations on a Local Area Network. This application will be used in 17 other LANs where the back-end will be in one workstation per LAN.

I was thinking of creating an INI file which would specify the IP Address of the workstation with the back-end. This way I do not have to hard-code the IP Address in the application itself.

Question:
Is there a way of retrieving the values from an INI file within Access? If so, does anyone have the code to accomplish this task? NOTE: I intend on having the ini file reside in the same directory as the Access front-end.

Thanks much,

Manny64
 
ACCESS allows you to write and read (+append) text files easily. Just have a look in the online help and search for "OPEN".
Alternatively you could use the Windows registry (provided that you have the necessary rights (NT/W2K)).
In this case you need "GETSETTINGS" and "SETSETTINGS".
 
on the other hand, you can also read/write the .ini files if you really want to. They are just plain test files, although there are API functions you can use to do somewhat more than just read/write.

On the other hand, you have to save some pointer to the db, so why not just a small table in the db it-self. Place the URL address in it and use that to find the data part as necessary.


MichaelRed
redmsp@erols.com

There is never time to do it right but there is always time to do it over
 
Thank you for the feedback Francescina and MichaelRed. Sometimes I think I make things more complicated than they really are. You're absolutely right, Michael. That is the simplest way to resolve this. Thank you again to both of you for your response.

Manny64
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top