About flat dataBase
Posted: Thu May 24, 2012 9:34 am
Hi everybody
I try pour make a little db dy using this example :
`==========set it up============
record car
wheel as integer
color as string * 10
end record
dim dbase as randomfile
`open file this before assigning the record
dbase.open("database.txt")
`assign record
dbase.assign(car)
`===============================
`put some data
car.wheel=10
car.color="red"
`append to file
dbase.append
`==========check the results====
car.wheel=0
car.color=""
`read record 1 yuo can also write a record with put
dbase.get(1)
showmessage "found "+car.color+str$(car.wheel)
`===============================
Back to top
My Question:
In database.txt, all records are in line.
How can insert a LineFeed or CR after each record to export this file ?
Thanks
I try pour make a little db dy using this example :
`==========set it up============
record car
wheel as integer
color as string * 10
end record
dim dbase as randomfile
`open file this before assigning the record
dbase.open("database.txt")
`assign record
dbase.assign(car)
`===============================
`put some data
car.wheel=10
car.color="red"
`append to file
dbase.append
`==========check the results====
car.wheel=0
car.color=""
`read record 1 yuo can also write a record with put
dbase.get(1)
showmessage "found "+car.color+str$(car.wheel)
`===============================
Back to top
My Question:
In database.txt, all records are in line.
How can insert a LineFeed or CR after each record to export this file ?
Thanks