473,399 Members | 3,603 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Dateset question

I am doubtful about some point or confuse on design program.
User A run Invoice form, Load the current month data into the dataset.
ADMIN want to lock some invoices , so ADMIN just update the dataset in his
"admin form"
Now, if USER A never exit the form, He can amend the record everytimes.
Does anyfunction set auto refresh in USER A 's invoice form ??
or I should change some design, for example, extra security tables, If USER
A amend the record, a extra function to check the status out side from the
dataset , so It must be up-to-date.

Please give some advice.
Thanks a lot
Nov 21 '05 #1
5 884
Hi,

The easiest way is to have a date/time stamp field in the table. Whenever
an update occurs, update this field. Whenever you do an update check this
field in your dataset against the current field in the table. If it doesn't
match anymore then you know someone else updated the record since you first
retrieved it. Relay this news to the user along with the new data and then
ask them to re-do the update. That should get you started. You can do more
complicated things like saving what the user entered so they don't have to
re-key it in when there is a concurrency issue and etc. Good luck! Ken.

--
Ken Dopierala Jr.
For great ASP.Net web hosting try:
http://www.webhost4life.com/default.asp?refid=Spinlight

"Agnes" <ag***@dynamictech.com.hk> wrote in message
news:Om**************@TK2MSFTNGP11.phx.gbl...
I am doubtful about some point or confuse on design program.
User A run Invoice form, Load the current month data into the dataset.
ADMIN want to lock some invoices , so ADMIN just update the dataset in his
"admin form"
Now, if USER A never exit the form, He can amend the record everytimes.
Does anyfunction set auto refresh in USER A 's invoice form ??
or I should change some design, for example, extra security tables, If USER A amend the record, a extra function to check the status out side from the
dataset , so It must be up-to-date.

Please give some advice.
Thanks a lot

Nov 21 '05 #2
thanks Ken, But I don't understand for some points.
How can I [ do an update check this field in your dataset against the
current field in the table ]??
Where should I [do an update ]? Invoice Form ?

"Ken Dopierala Jr." <kd*********@wi.rr.com> ¦b¶l¥ó
news:Oi*************@TK2MSFTNGP09.phx.gbl ¤¤¼¶¼g...
Hi,

The easiest way is to have a date/time stamp field in the table. Whenever
an update occurs, update this field. Whenever you do an update check this
field in your dataset against the current field in the table. If it doesn't match anymore then you know someone else updated the record since you first retrieved it. Relay this news to the user along with the new data and then ask them to re-do the update. That should get you started. You can do more complicated things like saving what the user entered so they don't have to
re-key it in when there is a concurrency issue and etc. Good luck! Ken.

--
Ken Dopierala Jr.
For great ASP.Net web hosting try:
http://www.webhost4life.com/default.asp?refid=Spinlight

"Agnes" <ag***@dynamictech.com.hk> wrote in message
news:Om**************@TK2MSFTNGP11.phx.gbl...
I am doubtful about some point or confuse on design program.
User A run Invoice form, Load the current month data into the dataset.
ADMIN want to lock some invoices , so ADMIN just update the dataset in his "admin form"
Now, if USER A never exit the form, He can amend the record everytimes.
Does anyfunction set auto refresh in USER A 's invoice form ??
or I should change some design, for example, extra security tables, If

USER
A amend the record, a extra function to check the status out side from the dataset , so It must be up-to-date.

Please give some advice.
Thanks a lot


Nov 21 '05 #3
Hi,

I think I read your original post wrong. You wanted to be able to actually
lock the invoices for a while, not check for concurrency. To do that you
could put a field in the invoice table (i.e. Locked). If it is 0 then the
invoice is unlocked, if it is 1 then the invoice is locked. Then if you
query this field before you do an update you'll know if the user can do the
update or not. For example:

User loads invoice and starts editting it.
Admin locks invoice.
User finishes editting and tries to update.
Your code would first look at the invoice number the user is trying to
update. Then it would go to the database and check the Locked field on that
record. If it is unlocked then you would do the update. If it is locked
then you could send a message back to the user telling them that the invoice
has been locked.

Good luck! Ken.

"Agnes" <ag***@dynamictech.com.hk> wrote in message
news:uX**************@TK2MSFTNGP10.phx.gbl...
thanks Ken, But I don't understand for some points.
How can I [ do an update check this field in your dataset against the
current field in the table ]??
Where should I [do an update ]? Invoice Form ?

"Ken Dopierala Jr." <kd*********@wi.rr.com> ¦b¶l¥ó
news:Oi*************@TK2MSFTNGP09.phx.gbl ¤¤¼¶¼g...
Hi,

The easiest way is to have a date/time stamp field in the table. Whenever
an update occurs, update this field. Whenever you do an update check this field in your dataset against the current field in the table. If it

doesn't
match anymore then you know someone else updated the record since you

first
retrieved it. Relay this news to the user along with the new data and

then
ask them to re-do the update. That should get you started. You can do

more
complicated things like saving what the user entered so they don't have to re-key it in when there is a concurrency issue and etc. Good luck! Ken.
--
Ken Dopierala Jr.
For great ASP.Net web hosting try:
http://www.webhost4life.com/default.asp?refid=Spinlight

"Agnes" <ag***@dynamictech.com.hk> wrote in message
news:Om**************@TK2MSFTNGP11.phx.gbl...
I am doubtful about some point or confuse on design program.
User A run Invoice form, Load the current month data into the dataset.
ADMIN want to lock some invoices , so ADMIN just update the dataset in his "admin form"
Now, if USER A never exit the form, He can amend the record everytimes. Does anyfunction set auto refresh in USER A 's invoice form ??
or I should change some design, for example, extra security tables,
If USER
A amend the record, a extra function to check the status out side from

the dataset , so It must be up-to-date.

Please give some advice.
Thanks a lot



Nov 21 '05 #4
thanks Ken, But I don't understand for some points.
How can I [ do an update check this field in your dataset against the
current field in the table ]??
Where should I [do an update ]? Invoice Form ?

"Ken Dopierala Jr." <kd*********@wi.rr.com> ¦b¶l¥ó
news:Oi*************@TK2MSFTNGP09.phx.gbl ¤¤¼¶¼g...
Hi,

The easiest way is to have a date/time stamp field in the table. Whenever
an update occurs, update this field. Whenever you do an update check this
field in your dataset against the current field in the table. If it doesn't match anymore then you know someone else updated the record since you first retrieved it. Relay this news to the user along with the new data and then ask them to re-do the update. That should get you started. You can do more complicated things like saving what the user entered so they don't have to
re-key it in when there is a concurrency issue and etc. Good luck! Ken.

--
Ken Dopierala Jr.
For great ASP.Net web hosting try:
http://www.webhost4life.com/default.asp?refid=Spinlight

"Agnes" <ag***@dynamictech.com.hk> wrote in message
news:Om**************@TK2MSFTNGP11.phx.gbl...
I am doubtful about some point or confuse on design program.
User A run Invoice form, Load the current month data into the dataset.
ADMIN want to lock some invoices , so ADMIN just update the dataset in his "admin form"
Now, if USER A never exit the form, He can amend the record everytimes.
Does anyfunction set auto refresh in USER A 's invoice form ??
or I should change some design, for example, extra security tables, If

USER
A amend the record, a extra function to check the status out side from the dataset , so It must be up-to-date.

Please give some advice.
Thanks a lot


Nov 21 '05 #5
Hi,

I think I read your original post wrong. You wanted to be able to actually
lock the invoices for a while, not check for concurrency. To do that you
could put a field in the invoice table (i.e. Locked). If it is 0 then the
invoice is unlocked, if it is 1 then the invoice is locked. Then if you
query this field before you do an update you'll know if the user can do the
update or not. For example:

User loads invoice and starts editting it.
Admin locks invoice.
User finishes editting and tries to update.
Your code would first look at the invoice number the user is trying to
update. Then it would go to the database and check the Locked field on that
record. If it is unlocked then you would do the update. If it is locked
then you could send a message back to the user telling them that the invoice
has been locked.

Good luck! Ken.

"Agnes" <ag***@dynamictech.com.hk> wrote in message
news:uX**************@TK2MSFTNGP10.phx.gbl...
thanks Ken, But I don't understand for some points.
How can I [ do an update check this field in your dataset against the
current field in the table ]??
Where should I [do an update ]? Invoice Form ?

"Ken Dopierala Jr." <kd*********@wi.rr.com> ¦b¶l¥ó
news:Oi*************@TK2MSFTNGP09.phx.gbl ¤¤¼¶¼g...
Hi,

The easiest way is to have a date/time stamp field in the table. Whenever
an update occurs, update this field. Whenever you do an update check this field in your dataset against the current field in the table. If it

doesn't
match anymore then you know someone else updated the record since you

first
retrieved it. Relay this news to the user along with the new data and

then
ask them to re-do the update. That should get you started. You can do

more
complicated things like saving what the user entered so they don't have to re-key it in when there is a concurrency issue and etc. Good luck! Ken.
--
Ken Dopierala Jr.
For great ASP.Net web hosting try:
http://www.webhost4life.com/default.asp?refid=Spinlight

"Agnes" <ag***@dynamictech.com.hk> wrote in message
news:Om**************@TK2MSFTNGP11.phx.gbl...
I am doubtful about some point or confuse on design program.
User A run Invoice form, Load the current month data into the dataset.
ADMIN want to lock some invoices , so ADMIN just update the dataset in his "admin form"
Now, if USER A never exit the form, He can amend the record everytimes. Does anyfunction set auto refresh in USER A 's invoice form ??
or I should change some design, for example, extra security tables,
If USER
A amend the record, a extra function to check the status out side from

the dataset , so It must be up-to-date.

Please give some advice.
Thanks a lot



Nov 21 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Stevey | last post by:
I have the following XML file... <?xml version="1.0"?> <animals> <animal> <name>Tiger</name> <questions> <question index="0">true</question> <question index="1">true</question> </questions>
7
by: nospam | last post by:
Ok, 3rd or is it the 4th time I have asked this question on Partial Types, so, since it seems to me that Partial Types is still in the design or development stages at Microsoft, I am going to ask...
3
by: Ekqvist Marko | last post by:
Hi, I have one Access database table including questions and answers. Now I need to give answer id automatically to questionID column. But I don't know how it is best (fastest) to do? table...
4
by: mhw | last post by:
When we called DataSetTable.AcceptChanges() ,it same to call DateSet.AcceptChange() Please tall me why?
10
by: glenn | last post by:
I am use to programming in php and the way session and post vars are past from fields on one page through to the post page automatically where I can get to their values easily to write to a...
10
by: Rider | last post by:
Hi, simple(?) question about asp.net configuration.. I've installed ASP.NET 2.0 QuickStart Sample successfully. But, When I'm first start application the follow message shown. ========= Server...
53
by: Jeff | last post by:
In the function below, can size ever be 0 (zero)? char *clc_strdup(const char * CLC_RESTRICT s) { size_t size; char *p; clc_assert_not_null(clc_strdup, s); size = strlen(s) + 1;
56
by: spibou | last post by:
In the statement "a *= expression" is expression assumed to be parenthesized ? For example if I write "a *= b+c" is this the same as "a = a * (b+c)" or "a = a * b+c" ?
2
by: Allan Ebdrup | last post by:
Hi, I'm trying to render a Matrix question in my ASP.Net 2.0 page, A matrix question is a question where you have several options that can all be rated according to several possible ratings (from...
3
by: Zhang Weiwu | last post by:
Hello! I wrote this: ..required-question p:after { content: "*"; } Corresponding HTML: <div class="required-question"><p>Question Text</p><input /></div> <div...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.