Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 10 of 11 total
Thread Browse on cached records
Tue, Jan 24 2017 4:14 AMPermanent Link

Hershcu Sorin

Hello

I want to browse between cached records to avoids doubles values.
How can I do it?
I remember an article about working with CachedUpdates but I can't find it

Thanks Sorin
Tue, Jan 24 2017 3:10 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Hershcu,

<< I want to browse between cached records to avoids doubles values.  How can I do it? I remember an article about working with CachedUpdates but I can't find it >>

Could you give me a little more information on exactly what you're trying to do ?  I'm not entirely sure what you mean by "avoids double values".

Thanks,

Tim Young
Elevate Software
www.elevatesoft.com
Thu, Jan 26 2017 5:25 AMPermanent Link

Hershcu Sorin

Thanks

When I add records to a table that is in BeginCached mode
I want to check that I didn't add a value that exists already

Thanks Sorin
Mon, Jan 30 2017 3:18 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Hershcu,

<< When I add records to a table that is in BeginCached mode I want to check that I didn't add a value that exists already >>

A primary key is required for cached update usage (it uses the replication functionality internally), and that will also ensure that you cannot create two rows with the same primary key.

Tim Young
Elevate Software
www.elevatesoft.com
Tue, Jan 31 2017 11:08 AMPermanent Link

Hershcu Sorin

Thanks Tim

<<A primary key is required for cached update usage (it uses the replication functionality internally), and that will also ensure that you cannot create two rows with the same primary key.>>

I have a primary key but maybe I'll clarify my question with a simple scenario.
I have m/d data. I want to add a new record to the master table and some records to the detail table.
Since I want to save, commit all the new records on one instance I set the detail table on BeginCachedUpdates.
Now I want to check after every new record inserted on the detail table if the value exists on an other record between the cached records and show a error message.

I hope I clarify my problem
Thanks Sorin
Thu, Feb 2 2017 2:38 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Hershcu,

<< I have a primary key but maybe I'll clarify my question with a simple scenario. I have m/d data. I want to add a new record to the master table and some records to the detail table. Since I want to save, commit all the new records on one instance I set the detail table on BeginCachedUpdates. Now I want to check after every new record inserted on the detail table if the value exists on an other record between the cached records and show a error message. >>

I'm still not sure I understand.

Do you want to check for duplicate rows with only the cached rows, or with both the cached rows and any rows in the underlying table ?

Also, again, you cannot insert multiple rows with the same primary key in the cached detail table, so there isn't really any need to check anything.  You'll get a primary key exception if you try to insert a new row that has the same primary key, which (I think) is what you want.

Tim Young
Elevate Software
www.elevatesoft.com
Sun, Feb 5 2017 2:59 AMPermanent Link

Hershcu Sorin

Thanks

I want to check for duplicate rows only on the cached rows.
and I want to show a message error before the user try to save the row

Sorin

<< I have a primary key but maybe I'll clarify my question with a simple scenario. I have m/d data. I want to add a new record to the master table and some records to the detail table. Since I want to save, commit all the new records on one instance I set the detail table on BeginCachedUpdates. Now I want to check after every new record inserted on the detail table if the value exists on an other record between the cached records and show a error message. >>

I'm still not sure I understand.

Do you want to check for duplicate rows with only the cached rows, or with both the cached rows and any rows in the underlying table ?

Also, again, you cannot insert multiple rows with the same primary key in the cached detail table, so there isn't really any need to check anything.  You'll get a primary key exception if you try to insert a new row that has the same primary key, which (I think) is what you want.

Tim Young
Elevate Software
www.elevatesoft.com
Sun, Feb 5 2017 5:42 AMPermanent Link

Fernando Dias

Team Elevate Team Elevate

Sorin,

I think I know what you mean... you want the ability to query the cached rows, as if it was a temporary table.
As far as I know there is no way to do that.
I do it myself in my applications using a temporary table for the detail rows, instead of cached updates, this way:

- On Edit -> Load all the detail rows to a temporary table
- On Cancel -> the temporary table is discarded
- On Post -> Previous detail rows in the database are replaced by those in the temporary table under a transaction

--
Fernando Dias
[Team Elevate]
Tue, Feb 7 2017 5:14 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com


<< I want to check for duplicate rows only on the cached rows. and I want to show a message error before the user try to save the row >>

Okay, but what constitutes a "duplicate row" ?  Is the primary key not sufficient for determining this ?

Tim Young
Elevate Software
www.elevatesoft.com
Wed, Feb 8 2017 12:38 PMPermanent Link

Hershcu Sorin

<<Okay, but what constitutes a "duplicate row" ?  Is the primary key not sufficient for determining this ?>>

On my case the column that link to the master table and an other column from the detail table are the primary key.
When I post a cached table with a duplicate primary key values it's raise an error.
And I want to raise an error before the user try to commit the cached data.

Is Fernando suggestion the only option?

Thanks Sorin
Page 1 of 2Next Page »
Jump to Page:  1 2
Image