 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
xtcsuk Guest
|
Posted: Tue May 08, 2007 5:12 pm Post subject: Server/Client communication |
|
|
I tried this query on datasnap with no luck, maybe because it's been queried
more than enough, appreciate your input.
D6 Entp.
In an application using datasnap technology, the server is packaging the
data packet in the TDataSetProvider.AfterApplyDatSets as follows:
OwnerData := VarArrayCreate([0, 1], varVariant);
OwnerData[0] := VarArrayOf(['Test', 'Description', True]);
OwnerData[1] := VarArrayOf(['Test1', 'Description', True]);
How can it (client app.) access this bit of message in on
TClientDataSet.AfterApplyUpdates() method?
regards, |
|
| Back to top |
|
 |
Farshad Guest
|
Posted: Tue May 08, 2007 11:22 pm Post subject: Re: Server/Client communication |
|
|
procedure TForm1.ClientDataSet1AfterApplyUpdates(Sender: TObject; var
OwnerData: OleVariant);
begin
Memo1.Lines.Add(OwnerData[0][0]); // Test
Memo1.Lines.Add(OwnerData[0][1]); // Description
Memo1.Lines.Add(OwnerData[1][0]); // Test1
Memo1.Lines.Add(OwnerData[1][1]); // Description
end;
"xtcsuk" <xtcsuk at gmail dot com> wrote in message
news:464069da (AT) newsgroups (DOT) borland.com...
| Quote: | I tried this query on datasnap with no luck, maybe because it's been
queried more than enough, appreciate your input.
D6 Entp.
In an application using datasnap technology, the server is packaging the
data packet in the TDataSetProvider.AfterApplyDatSets as follows:
OwnerData := VarArrayCreate([0, 1], varVariant);
OwnerData[0] := VarArrayOf(['Test', 'Description', True]);
OwnerData[1] := VarArrayOf(['Test1', 'Description', True]);
How can it (client app.) access this bit of message in on
TClientDataSet.AfterApplyUpdates() method?
regards,
|
|
|
| Back to top |
|
 |
xtcsuk Guest
|
Posted: Wed May 09, 2007 2:22 pm Post subject: Re: Server/Client communication |
|
|
Thank you, I missed a part that the TClientDataSet.AfterApplyUpdates should
check for
if OwnerData[0][0] > '' then
if if OwnerData[0][0] does not contain anything it results in AV. How can I
approach this?
regards
"Farshad" <farshad (AT) fmsoft (DOT) net> wrote in message
news:4640bfcf (AT) newsgroups (DOT) borland.com...
| Quote: | procedure TForm1.ClientDataSet1AfterApplyUpdates(Sender: TObject; var
OwnerData: OleVariant);
begin
Memo1.Lines.Add(OwnerData[0][0]); // Test
Memo1.Lines.Add(OwnerData[0][1]); // Description
Memo1.Lines.Add(OwnerData[1][0]); // Test1
Memo1.Lines.Add(OwnerData[1][1]); // Description
end; |
|
|
| Back to top |
|
 |
Brian Andersen (www.europ Guest
|
Posted: Thu May 10, 2007 8:11 am Post subject: Re: Server/Client communication |
|
|
"xtcsuk" <xtcsuk at gmail dot com> skrev i en meddelelse
news:46419397 (AT) newsgroups (DOT) borland.com...
| Quote: | Thank you, I missed a part that the TClientDataSet.AfterApplyUpdates
should check for
if OwnerData[0][0] > '' then
if if OwnerData[0][0] does not contain anything it results in AV. How can
I approach this?
|
Hi,
try to use VarIsEmpty or VarIsNull....
if (not VarIsEmpty(OwnerData[0])) and ((not VarIsEmpty(OwnerData[0][0])) and
((OwnerData[0][0]) <> '')) then ...
/Brian |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|