Click here to Skip to main content
16,006,341 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionDataset bound to combobox Pin
G7236014-Apr-06 9:28
G7236014-Apr-06 9:28 
AnswerRe: Dataset bound to combobox Pin
Dave Kreskowiak17-Apr-06 4:24
mveDave Kreskowiak17-Apr-06 4:24 
QuestionAdvice for tracking a recordset change - Hash Value? Pin
Brad6ft414-Apr-06 7:59
Brad6ft414-Apr-06 7:59 
AnswerRe: Advice for tracking a recordset change - Hash Value? Pin
Dave Kreskowiak14-Apr-06 8:26
mveDave Kreskowiak14-Apr-06 8:26 
GeneralRe: Advice for tracking a recordset change - Hash Value? Pin
Brad6ft414-Apr-06 8:47
Brad6ft414-Apr-06 8:47 
GeneralRe: Advice for tracking a recordset change - Hash Value? Pin
Dave Kreskowiak14-Apr-06 9:28
mveDave Kreskowiak14-Apr-06 9:28 
GeneralRe: Advice for tracking a recordset change - Hash Value? Pin
Brad6ft417-Apr-06 4:42
Brad6ft417-Apr-06 4:42 
GeneralRe: Advice for tracking a recordset change - Hash Value? Pin
Dave Kreskowiak17-Apr-06 12:29
mveDave Kreskowiak17-Apr-06 12:29 
Brad6ft4 wrote:
quite innapropriate (over kill to say the least).


Yeah? Wait till you get done implementing this in your own code. You'll sit back, look at this code, and think, "Hey, maybe it wasn't overkill after all..."

Brad6ft4 wrote:
I simply want to check if a row has changed or not.


Precisely when do you want to do this? Theres a couple of ways of doing this, but what works depends on your requirements. You have a concurrency problem.

You can lock the records so that only one client gets a Read/Write copy of the data, but if all your clients on working on the same set of records, this won't work. The first client to lock the records is the ONLY client that gets to ever attempt to write any changes back.

If that doesn't work for you, you'll have to implement some kind of "checkout" scheme in your SQL. Since each client has to check to see if the record they have is different from the one it has already, you have to read the values from the database BEFORE you can write the changed data back. The record can change between the time any one client reads it to check for a change and when that same client attempts to write the change back out to the database. You'll have to implement some kind of locking mechanism so that when you read a record to check for a change, you're actually "checking it out" like a book from the library. This part MUST be done in a stored procedure in the database.

From a logic point of view, the stored proc has to attempt to check the record out before it checks to see if the record changed, THEN read and pass it to the client. You'll have to implement a "check out" scheme in SQL. pass some kind of ReadOnly flag in the dataset to go with it. The database has to tell any client that attempts to check to see if it can write data back to the database that the record is already checked out.


Now, using Notification Services, if a record changes, it can automatically notify each client to do something very simple. Re-query the database for this one record.

It's your call...




Dave Kreskowiak
Microsoft MVP - Visual Basic

GeneralRe: Advice for tracking a recordset change - Hash Value? Pin
Brad6ft422-Apr-06 6:33
Brad6ft422-Apr-06 6:33 
Questionobjectdatasource has no values to insert Pin
dr S.A.f.14-Apr-06 2:43
dr S.A.f.14-Apr-06 2:43 
AnswerRe: objectdatasource has no values to insert Pin
Steve Pullan14-Apr-06 3:50
Steve Pullan14-Apr-06 3:50 
GeneralRe: objectdatasource has no values to insert Pin
dr S.A.f.14-Apr-06 8:20
dr S.A.f.14-Apr-06 8:20 
QuestionVb 6 and access 2000 in LAN Pin
arunendra14-Apr-06 2:11
arunendra14-Apr-06 2:11 
AnswerRe: Vb 6 and access 2000 in LAN Pin
Dave Kreskowiak14-Apr-06 3:34
mveDave Kreskowiak14-Apr-06 3:34 
GeneralRe: Vb 6 and access 2000 in LAN Pin
arunendra14-Apr-06 5:15
arunendra14-Apr-06 5:15 
GeneralRe: Vb 6 and access 2000 in LAN Pin
Dave Kreskowiak14-Apr-06 6:43
mveDave Kreskowiak14-Apr-06 6:43 
GeneralRe: Vb 6 and access 2000 in LAN Pin
arunendra14-Apr-06 7:10
arunendra14-Apr-06 7:10 
GeneralRe: Vb 6 and access 2000 in LAN Pin
Dave Kreskowiak14-Apr-06 7:14
mveDave Kreskowiak14-Apr-06 7:14 
GeneralRe: Vb 6 and access 2000 in LAN Pin
arunendra14-Apr-06 23:35
arunendra14-Apr-06 23:35 
GeneralRe: Vb 6 and access 2000 in LAN Pin
Dave Kreskowiak15-Apr-06 3:37
mveDave Kreskowiak15-Apr-06 3:37 
GeneralRe: Vb 6 and access 2000 in LAN Pin
arunendra15-Apr-06 5:18
arunendra15-Apr-06 5:18 
GeneralRe: Vb 6 and access 2000 in LAN Pin
Dave Kreskowiak15-Apr-06 6:47
mveDave Kreskowiak15-Apr-06 6:47 
GeneralRe: Vb 6 and access 2000 in LAN Pin
arunendra16-Apr-06 2:26
arunendra16-Apr-06 2:26 
GeneralRe: Vb 6 and access 2000 in LAN Pin
Dave Kreskowiak16-Apr-06 10:24
mveDave Kreskowiak16-Apr-06 10:24 
GeneralRe: Vb 6 and access 2000 in LAN Pin
arunendra17-Apr-06 0:02
arunendra17-Apr-06 0:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.