Thread View: borland.public.cppbuilder.database.multi-tier
5 messages
5 total messages
Started by Nick Rambarransingh
Sun, 30 Jul 2000 00:00
Client DataSets and Mem requirements ...
Author: Nick Rambarransingh
Date: Sun, 30 Jul 2000 00:00
Date: Sun, 30 Jul 2000 00:00
24 lines
1691 bytes
1691 bytes
Good Day All, I am of the impression that once you design the client dataset to server dataprovider, one should not be changing the SQL query commands. I understand this isn't true because of the CommandText property. However, everytime I converse with someone, there seems to be the usual question, why would I want to change the SQL statement. It has got me wondering, am I doing something wrong? For example, in order to login, I created a form that collects userid and password. From this I dynamically change the SQL to get that persons statistics, lastlogin, loginstatus, etc. There is nothing wrong with this - right ? Last but not least, I am having trouble talking to the datamodule, which is in a client application, but my loginf form, and others, will all be in individual packages. Can I not access the data module from the client app? In the IDE, when I press "ClientModule->", I get the list of objects. However, at compile time, the linker does not know about the ClientModule anymore. I don't know why, or what to do. Someone please point me in the right direction. Thanks, Nick Borland Forever ...
Re: Client DataSets and Mem requirements ...
Author: Mark Cashman (TeamB)
Date: Tue, 01 Aug 2000 00:00
Date: Tue, 01 Aug 2000 00:00
12 lines
1051 bytes
1051 bytes
Hi, Nick! In many situations you can use TParam settings to influence what the query goes after without changing the SQL. However, are you having specific problems when you change the SQL at run time? ------ Mark Cashman, TeamB C++ Builder http://www.temporaldoorway.com/programming/index.htm C++ Builder, JBuilder programming information Home of The C++ Builder Programmer's Webring - Join us! ------
Re: Client DataSets and Mem requirements ...
Author: Nick Rambarransingh
Date: Tue, 01 Aug 2000 00:00
Date: Tue, 01 Aug 2000 00:00
27 lines
1890 bytes
1890 bytes
Hi Mark Cashman (TeamB), "In many situations you can use TParam settings to influence what the query goes after without changing the SQL." - Do you mean I can select * from my query on the server, and then from the client, if I pass a particular param, this will automatically filter the records being sent to me by the provider ? "However, are you having specific problems when you change the SQL at run time?" - Most definitely. I don't get the answer I am looking for. I have my query set to select all. Then, in the formActivate method, I attempt to Activate the dataset. I have the user enter UserId and Password. I then set the command text to select the record where the userid equals "Whatever". I then test the result to determine what I shouuld tell the user: you must change your pw, invalid id or pw, etc., etc. And here is something else strange - If I active the dataset, do something with it, and then close the dataset, the minute I try to activate is again, I get an OleEnterprise error - unable to get cursor handle, or something to that effect. This always happens following the DataSet->Active = TRUE. I am not sure where to go from here, but I tell you, I getting frustrated .... Thanks, Nick Borland Forever ...
Re: Client DataSets and Mem requirements ...
Author: Mark Cashman (TeamB)
Date: Wed, 02 Aug 2000 00:00
Date: Wed, 02 Aug 2000 00:00
20 lines
1267 bytes
1267 bytes
Hi, Nick!
Set up your query as
SELECT * FROM Login WHERE UserID=:UserID AND
SomethingElse=:SomethingElse
Then set the Query1->Params->ParamByName('UserID')->AsString = Whatever,
etc.
Then open the query. It will select for the values you specified.
Does that help? There's a section in the Developer's Guide on this,
also, IIRC.
------
Mark Cashman, TeamB C++ Builder
http://www.temporaldoorway.com/programming/index.htm
C++ Builder, JBuilder programming information
Home of The C++ Builder Programmer's Webring - Join us!
------
Re: Client DataSets and Mem requirements ...
Author: Nick Rambarransingh
Date: Fri, 11 Aug 2000 00:00
Date: Fri, 11 Aug 2000 00:00
32 lines
1612 bytes
1612 bytes
Marck,
Actually it did help. I continued to plug away at it and eventuall got
it. However, I have discovered the Param thing on the server, and setting
the values on the clinet and sending them to the server. Very cool !
Thanks, Nick
Mark Cashman (TeamB) wrote:
> Hi, Nick!
>
> Set up your query as
>
> SELECT * FROM Login WHERE UserID=:UserID AND
> SomethingElse=:SomethingElse
>
> Then set the Query1->Params->ParamByName('UserID')->AsString = Whatever,
> etc.
>
> Then open the query. It will select for the values you specified.
>
> Does that help? There's a section in the Developer's Guide on this,
> also, IIRC.
>
> ------
> Mark Cashman, TeamB C++ Builder
> http://www.temporaldoorway.com/programming/index.htm
> C++ Builder, JBuilder programming information
> Home of The C++ Builder Programmer's Webring - Join us!
> ------
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