Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ClientDataset and Mybase XML tables (XML type)

204 views
Skip to first unread message

Roberto Capra Neto

unread,
Dec 6, 2002, 6:39:53 AM12/6/02
to
ClientDataset and Mybase XML tables (XML type)

Hi,

I friend has a problem and I made some tests and it really happens...
I'm using delphi 6, and the problem happened when I try to use ClientDataset
with MyBase XML tables in a little application. When I create the dataset
and save the XML file, the component generate a XML file using a XML format
like this:

<ROW RowState="4" ReciboID="1" Usuario="Tarcísio"
Codigo="KTRH-DECB-24406-KINIX" Prestacao="1" Aplicativo="Censo"
Versao="1999" Tipo="1" Vencimento="19990905" Prestacoes="1"
DataMinima="19990830" Gratuitos="10" />
<ROW RowState="4" ReciboID="2" Usuario="COOPRASE"
Codigo="KMHX-KTFT-31781-KIHTH" Prestacao="1" Aplicativo="IMF Nativas"
Versao="1999" Tipo="1" Vencimento="19990909" Prestacoes="1"
DataMinima="19990909" Gratuitos="10" />

Everithing works fine... so, I made changes in application to use MIDASLIB
(in the uses clause) and compile the application without packages. So, it
just stop to work.

Now, if I open the XML file, I have a diferent file using another XML
format. I don't know why, but the application just change the XML format of
the older file to something like this:

- <ROW>
RowState="4"
<ReciboID>1</ReciboID>
<Usuario>Tarcísio</Usuario>
<Codigo>KTRH-DECB-24406-KINIX</Codigo>
<Prestacao>1</Prestacao>
<Aplicativo>Censo</Aplicativo>
<Versao>1999</Versao>
<Tipo>1</Tipo>
<Vencimento>19990905</Vencimento>
<Prestacoes>1</Prestacoes>
<DataMinima>19990830</DataMinima>
<Gratuitos>10</Gratuitos>
</ROW>
- <ROW>
RowState="4"
<ReciboID>3</ReciboID>
<Usuario>COOPRASE</Usuario>
<Codigo>KMHX-DMBE-3027-GNRT</Codigo>
<Prestacao>1</Prestacao>
<Aplicativo>Censo</Aplicativo>
<Versao>1999</Versao>
<Tipo>1</Tipo>
<Vencimento>19990909</Vencimento>
<Prestacoes>1</Prestacoes>
<DataMinima>19990909</DataMinima>
<Gratuitos>10</Gratuitos>
</ROW>

So, my questions:

1) How can I change the format of new file to older format?
2) This changes (Midaslib...) is the cause of problems? Another possible
cause?
3) I couldn't find any kind of document or an article that explain the
problem.

Thanks for any help,

[]'s

BETO.


Roberto Capra Neto

unread,
Dec 6, 2002, 8:02:54 AM12/6/02
to
PS: Sorry by multipost of this message, but I really didn't know a right
group.

Thanks,

[]'s

BETO.

"Roberto Capra Neto" <NOS...@hotmail.com> escreveu na mensagem
news:3df08c8a$1...@newsgroups.borland.com...

Leonel

unread,
Dec 6, 2002, 7:40:21 AM12/6/02
to
"Roberto Capra Neto" wrote:

> Everithing works fine... so, I made changes in application to use MIDASLIB
> (in the uses clause) and compile the application without packages. So, it
> just stop to work.

I can confirm this is a problem in D6, but it's working fine in D7. The
following code demonstrates the problem:

uses Db, DBClient;

procedure TForm1.Button1Click(Sender: TObject);
var
cs : TClientDataSet;
begin
cs := TClientDataSet.Create(nil);
try
cs.FieldDefs.Add('Campo1',ftstring,10);
cs.FieldDefs.Add('Campo2',ftstring,10);
cs.FieldDefs.Add('Campo3',ftstring,10);
cs.CreateDataSet;
cs.AppendRecord(['123','456','789']);
cs.AppendRecord(['abc','cde','fgh']);
cs.SaveToFile('c:\test.xml');
finally
cs.Free;
end;
end;

In Delphi 6, if you compile with MidasLib in the uses clause, it generates a
different XML than when using midas.dll.

--
Leonel


sphan...@gmail.com

unread,
Jul 29, 2015, 9:42:25 PM7/29/15
to
Hi
i also face the same issue, did anyone know how ? i also have other issue related to xml how can i use it to store image and using livebinding to create the form with imageviewer.
please help
0 new messages