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

How can access to INI file for Extract data

Status
Not open for further replies.

xbandx

Programmer
Feb 13, 2001
4
IT
I would like to import data to a file INI and create a new record into a database that I have made.

How can do this?


examples:
my INI file is:

[Campo1]
Value1=100
Value2=200

[Campo2]
Value1=222
Value2=333
 
Use the Open Statement to open an ASCII file
this is a Brief example not complete

'Open your database here

'open .INI file
Open "c:\your.ini" for Input as #1
' Loop through each line of .INI
Do While Not EOF(1)
Input #1, MyString 'get line of .INI file
'Add a record to database
rst.addnew
rst!yourfield = MyString
rst.update
loop
Close #1
db.close

OK DougP, MCP

Visit my WEB site to see how Bar-codes can help you be more productive
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top