Question Ado. Net retrieve newer records only

spide21

New member
Joined
Jan 26, 2009
Messages
2
Programming Experience
Beginner
Hi,

I'm new to Ado .Net, i already created a recordset and datatables and also fill in all the data to my dtable_name, but as far I understant, I can manipulate and then populate modified or newer records to the DB server, for example if userA insert a new record and the it is saved to the DB(Database) server, userB won't be able to retrieve that record from it's local dtable because it is local.

So, my question is, Is it possible to retrieve newer records only and then update the local dtable of userB, so dtable can be used to perform a sale?, if so, how to?


For example
userA dtable: (before insertion of a new recors)

Id custname address
1 jack jack_address

UserB dtable: (Before executing a sale to a customer)

Id custname address
1 jack jack_address


Now, userA insert a new record but userB does not have it yet because
He is using his local dtable, staying both like this:

userA dtable: (With new insertion on local table and also on the DB server)

Id custname address
1 jack jack_address
2 Moe Moe_address

userB dtable: (need to do some sales to "moe" but its local table does not have it yet)

Id custname address
1 jack jack_address

If I update the dtable from the DB server it last a lot and userB needs speed to do the sale and the faster way is just getting newer records only and then update the dtable (the original table's records from db server is about 10,000).

need help :confused:
 
Put an auto increment column on the table (as PK).

userB must know the maximum PK of the last row he downloaded (in your example it is row 1) so he can SELECT * FROM table WHERE pk_autoincrement > 1



Thing is, this sort of operation is a bit dumb; database apps don't work like this (clients dont hold lots of data.. the db server holds lots of data)
userB knows he wants to do sales to moe, so why doesnt he use that info to retrieve moe, and do the sales?

You'd need to describe the situation more accurately for me to find the logical hole, but suppose its like this:

A shop has a 2 computer system for account opening. At one end of the shop the boss (UserA) opens an account and gives the shopper an account card. The shopper goes and outs some things in a basket then goes to the till.. Of course the till doesnt know about the shopper yet but it's not supposed to!! The shopper gives the account card to the assistant and it is swiped into the till. The till looks up the account from the db and finds.. moe!

Tada!

There is no need for the till to have advance knowledge of moe.

If every customer gets a free gift upon opening, then the UserA should communicate to UserB "new user name=moe, send a free gift" ...

Do you see what I mean?
 
Back
Top