BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Server/Client communication

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (Multi-Tier)
View previous topic :: View next topic  
Author Message
xtcsuk
Guest





PostPosted: Tue May 08, 2007 5:12 pm    Post subject: Server/Client communication Reply with 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
Farshad
Guest





PostPosted: Tue May 08, 2007 11:22 pm    Post subject: Re: Server/Client communication Reply with 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;



"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





PostPosted: Wed May 09, 2007 2:22 pm    Post subject: Re: Server/Client communication Reply with 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?

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





PostPosted: Thu May 10, 2007 8:11 am    Post subject: Re: Server/Client communication Reply with quote

"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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (Multi-Tier) All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.