Thread View: borland.public.cppbuilder.database.multi-tier
3 messages
3 total messages
Started by zn
Sat, 13 Nov 1999 00:00
Help!Help!Help me!!!!!
Author: zn
Date: Sat, 13 Nov 1999 00:00
Date: Sat, 13 Nov 1999 00:00
27 lines
1428 bytes
1428 bytes
Hello:
I need you help!
When i write a multi-tier program using midas,i call a server's function
from the client,the server's function is :
m_DataModule->Query1->SQL->Text = "select * from XXX where aaa < 41";
m_DataModule->a_SQL = m_DataModule->Query1->SQL->Text;
ShowMessage(m_DataModule->Query1->SQL->Text);
the last sentence is to see if the Query1'Sql been set,when it run i can see
that the Query1's SQL is right.
but i add that :
ShowMessage(m_DataModule->Query1->SQL->Text);
in the event of BeforeOpen of the Query1,it show that the Query1's SQL is
NULL.
I can get the right other info ,e.g. the num of the Query1's recorder .
i don't know WHY???
The Client component is OLEnterpriseConnection,ClientDataSet,DataSourse.
The Server component is Provider,Database,Query,Session.
How can i do?
I'm eager to getting your help!!
a Chinese man
Z.N.
Re: Help!Help!Help me!!!!!
Author: John MacDonald
Date: Sat, 13 Nov 1999 00:00
Date: Sat, 13 Nov 1999 00:00
14 lines
716 bytes
716 bytes
zn : I would suggest you try putting a watch on the value instead. >ShowMessage(m_DataModule->Query1->SQL->Text); >in the event of BeforeOpen of the Query1,it show that the Query1's SQL is >NULL. Good luck JMAC out
Re: Help!Help!Help me!!!!!
Author: zn
Date: Sun, 14 Nov 1999 00:00
Date: Sun, 14 Nov 1999 00:00
65 lines
2299 bytes
2299 bytes
John MacDonald:
Thanks for your ansewer .
If i add the value to the Query1->SQL on the event of BeforeOpen ,it will be
OK.
But i want to know how can i control the data's transport from calling my
own function on the server.
I can call the server'function and the function can run and i can get the
value except the value of Query1->SQL.
The client's sentence is :
DataModule2->ClientDataSet1->Active = false;
i = 0;
ICanclAcctDisp MyObj;
MyObj.Bind(CLSID_CanclAcct);
MyObj.GetUserInfo(i,&wsProvierName,&j);
DataModule2->ClientDataSet1->ProviderName = wsProvierName;
DataModule2->ClientDataSet1->Open();
The server's sentence is :
if (Param1 == 0)
{ m_DataModule->Query1->Close();
m_DataModule->Query1->SQL->Text = "select * from XXX where aa <
41";
* Param2 = WideString("Provider1").Detach();
* Param3 = m_DataModule->Query1->RecordCount;
m_DataModule->Query1->Open();
}
The client send the param to the server,the server return the provider's
name and the recorder's count to the client.
the value of the provider's name and the recorder's count is right.
But the client can't get the values of i had selectted.
It show that "Query1:No SQL statement available"
Thanks for your answer to me.Waiting for your answer.
Z.N.
John MacDonald wrote in message <80l0ed$s2v1@forums.borland.com>...
>
>zn :
>
>I would suggest you try putting a watch on the value instead.
>
>
>>ShowMessage(m_DataModule->Query1->SQL->Text);
>>in the event of BeforeOpen of the Query1,it show that the Query1's SQL is
>>NULL.
>
>
>Good luck
>
>JMAC out
>
>
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads