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

Simple TextFile as data example

Status
Not open for further replies.

StevenK

Programmer
Jan 5, 2001
1,294
GB
Can anyone point me to a simple example of using text file(s) as a database. Is there one in the delphi demo files that I've overlooked ?
Any pointers would be appreciated.
I need to be able to read, view, edit, insert and delete records (lines ?) from a text file database.
Thanks in advance
Steve
 
check out the *.db files, I remember those being just plain
text with some extra chars. [bobafett] BobbaFet [bobafett]

Everyone has a right to my opinion.
E-mail me at caswegkamp@hotmail.com
 
I've seen an example somewhere (but can't think where) which makes use of standard '*.txt' files (tab limited or comma separated) and reads them (writes/updates, etc) as if they were a standard database table. I think schema files were involved - can anyone shed some light on this ?
Any pointers would be appreciated.
Steve
 
There is a project in the Demos\Db\Textdata directory, at least in D6 S. van Els
SAvanEls@cq-link.sr
 
When you have append Text table, you have to create Schema File for that, for eg.
[CUSTOMER] // File name with no extension.
FILETYPE = VARYING // Format: VARYING or FIXED
CHARSET = ascii // Language driver name.
DELIMITER = " // Delimiter for char fields.
SEPARATOR = , // Separator character
Field1 = Name,CHAR,12,0,0 // Field information
Field2 = Salary,FLOAT,8,2,12

CUSTOMER.TXT:

"John ",1221.001
"surya ",1500.00
"victor ",38392.00



for more detail go check with BDE help in Delphi 5.
Prahalath

 
Hi, Steve !
Would those old Win 3.1 - inifiles do the job ? There is a Delphi unit inifiles.pas with all the functions you needed to access contents of *.ini-files.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top