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

storing consecutive files

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi,

I'm trying to write a program in QB 1.1 which reads the data from a datalogging device on the com1 port and storing it in daily files. I am only slightly familiar with qbasic programming and have some problems setting a right timing procedure(each file should be opened at 0:00 and collect data written to it for 24 hrs, than be closed and saved, after which a new one is opened, etc.,etc.)and problems with saving the datafile under a different name (so it will not overwrite the preceding one). Can anyone help me?

absolute beginner
 
You should read up on DO/LOOP function in your QB's help. As far as the name thing, did you ever consider using the date as the filename??

StorageName$ = Mid$(DATE$, 1, 2) + Mid$(DATE$, 4, 2) + Mid$(DATE$, 7)

Of course the above line is set up in the following format: "mm-dd-yyyy". If you're planning to use it in another country, make sure you're using THAT country's DATE FORMAT.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top