Board index » delphi » SaveToFile, LoadFromFile & XML

SaveToFile, LoadFromFile & XML

I am trying to reload a TADOTable from data that was created from a
TADOTable.SaveToFile(filename,pfXML) statement. The database is MS SQL 7.0
that I am saving from and loading to. (I am using D5 Enterprise with the
D5EntUpdate and the d5adoupdate2 patches applied.)

When I use the LoadFromFile command, it executes and I can see my data
immediately, as I have a DBGrid pointing to that table.

However, when I close the table, all data is lost and the SQL table is
empty.

The only way I can get this to work is to do a TADOQuery.LoadFromFile and
then loop through that to load the TADOTable. This is not a big deal, but
why doesn't the LoadFromFile work directly to a TADOTable?

Thanks

Rick Stephens

 

Re:SaveToFile, LoadFromFile & XML


Rick
you can load to the database table only  records that has been changed
(changed i mean in the process of getting data from the database, disconnect
from database, handle your data locally and then connect back to database
and update your changes into the database)
if you are using this method to transfer data between databases you will
have to loop thrue your local table and make modifications manually.

Regards

  David  B.E    agros...@arava.co.il

Quote
"Rick Stephens" <r...@infocenterco.com> wrote in message

news:3b24b262_1@dnews...
Quote
> I am trying to reload a TADOTable from data that was created from a
> TADOTable.SaveToFile(filename,pfXML) statement. The database is MS SQL 7.0
> that I am saving from and loading to. (I am using D5 Enterprise with the
> D5EntUpdate and the d5adoupdate2 patches applied.)

> When I use the LoadFromFile command, it executes and I can see my data
> immediately, as I have a DBGrid pointing to that table.

> However, when I close the table, all data is lost and the SQL table is
> empty.

> The only way I can get this to work is to do a TADOQuery.LoadFromFile and
> then loop through that to load the TADOTable. This is not a big deal, but
> why doesn't the LoadFromFile work directly to a TADOTable?

> Thanks

> Rick Stephens

Other Threads