Re:Loading flat file data from ClientDataSet into SQL table
Can someone please tell me what I am doing wrong? I have Delphi 7 and sql
2000. I want to save my data to use for reports as flat files so 1) Sql
server doesn't have to be running except when the data is needed and 2) to
give me way to save the data directly with each project.
I have written the data to a CDS file using the TClientDataSet. I need to
know how to resolve the data read in from the CDS file into the SQL Server
table. I am doing the steps below which loads up the ClientData Set but
never transfers the information to the SQL table.
1) I have setup a ADO connection, ADO table, DataSetProvider and TClientData
Set componenets.
2) My ADO connection points to the SQL database, the ADO table points to the
table I want to update in that database.
3) The DataSet Provider points to the ADO table and its connection.
4) My TClientDataSet points to the DataSetProvider
I then loadFromFile into the TclientDataSet the contents of my CDS file and
call the ApplyUpdates(-1) routine checking for an error (I don't get one).
I am populating the ClientDataSet but it never get copied into the SQL
table.
Sorry if this is a dumb question - I 've tried consulting several books on
it and I thought I was doing it right.
adoTable1.Active := True;
cds1.Active := True;
cds1.LoadFromFile('C:\JOBS\TESTJOB-PLAN\DB_boards.cds');
cds1.ApplyUpdates(-1);
Any help would be appreciated.
Karen