Page 1 of 1

Open Dataset without request

Posted: Tue 30 Dec 2014 11:41
by FILLrate
Hi!
Situation is the following.

I have a Master dataset:

Code: Select all

SELECT ID, Name FROM TCustomers WHERE ID=:ID
and detailed datasets:

Code: Select all

SELECT ID, Price, CustomerID FROM TOrders WHERE CustomerID =:ID

Code: Select all

SELECT ID, Value, CustomerID FROM TPayments WHERE CustomerID =:ID
...

Code: Select all

SELECT ID, Value, CustomerID FROM TOrderDetails WHERE CustomerID =:ID
1. Show GUI with appropriate controls and open Master dataset
2. Open all detailed Datasets.
2. User is viewing or editing all necessary info
3. Start transaction.
4. Post all Dataset if needed.
5. Commit transaction.

When I need to add new customers I simply change:
2. User is viewing or editing all necessary info -> 2. User INSERT all necessary info

It's OK, but I have to open all datasets and this make "empty" request to the DB server.

So the question is: How can I open dataset (set active=true) without executing DB request?

Re: Open Dataset without request

Posted: Tue 30 Dec 2014 13:44
by azyk
DataSet can't be opened without sending a SQL query to the server. Therefore, in your case, when inserting records, you can set the maximum allowed value for the ID field.