I put this to gether to translate the banking history
file that I download from my bank to a table.
It is probably dificult to follow because some of
the work is done in the forms setup. If you will
follow the function calls that refer to "Table" in
your help files you will begin to make sense of it
maybe.
Please excuse my style, no formal training.
//-----------------------------------------------------
#include <vcl.h>
#include <dir.h>
#include <stdio.h>
#pragma hdrstop
#include "qif.h"
#include "report.h"
//------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//--------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
// Set the DatabaseName to the current working directory.
char *buff1 = new char [256];
getcwd(buff1, 256);
Table1->Active = false;
Table1->DatabaseName = buff1;
// If the database file is not present, create it.
if (!FileExists ("bnk.dbf"

)
Table1->CreateTable ();
Table1->Active = true;
// Clean up.
delete (buff1);
}
//---------------------------------------------------
void __fastcall TForm1::OpenClick(TObject *Sender)
{
// Set the start directory
char *buff1 = new char [256];
getcwd(buff1, 256);
OpenDialog->InitialDir = buff1;
//delete (buff1);
if (OpenDialog->Execute ())
{
strcpy (filename, OpenDialog->FileName.c_str ());
Form1->Caption = filename;
FILE *file;
int x = 0;
if ( (file = fopen(filename, "r"

) != NULL )
{
Table1->Active = false;
Table1->EmptyTable ();
Table1->Active = true;
while (!feof(file))
{
fgets(buff1, 256, file);
Table1->Insert();
for (; x < 5; x++)
{
fgets(buff1, 256, file);
int z = strlen (buff1);
int y = 0;
for (; y < z; y++)
{
buff1 [y] = buff1 [y + 1];
}
buff1 [y - 2] = NULL;
Table1->Fields[x]->AsString = buff1;
}
Table1->Post();
x = 0;
Table1->Next();
}
}
else
Application->MessageBox("File access error", "FILE ERROR", MB_OK);
}
}
//------------------------------------------------
void __fastcall TForm1::FormResize(TObject *Sender)
{
DBGrid1->Height = Form1->Height - 50;
Form1->Width = 507;
}
//------------------------------------------
void __fastcall TForm1::ExitClick(TObject *Sender)
{
Application->Terminate ();
}
//------------------------------------------
void __fastcall TForm1:

reviewClick(TObject *Sender)
{
ReportForm->Table1->Active = true;
ReportForm->QuickRep1->Preview ();
ReportForm->Table1->Active = false;
}
//----------------------------------------------