473,287 Members | 1,663 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,287 software developers and data experts.

datagridview optimistic concurrency null problem

It seems to me there are real problems with the datagridview (along
with the detailsview and form view) control when using optimistic
concurrency with fields that can be null. Trying to use these controls
I have many times had the update not work with no error generated.
After much experimentation I have narrowed it down to how the Update
Command is generated.

To make optimistic currency work, the builder generated an update
statement with a WHERE clause which has each field matched on its
original value to ensure that the record will not be updated if any
field has been changed. If any original value is null no match is ever
found and no update is performed. Just to prove the point I created a
detailsview form to go against the Northwind Customers table. The
first record has a null Region so any update does nothing - no update
but no error msg. I then changed the UpdateCommand of the SQL Data
Source to Region is Null and the update failed. Also if I did not
check Optimistic Concurrency updates work.

Is there a way to get Optimistic Concurrency to work with null data. I
though that 'convertemptystringtonull' might do somthing for this
problem but it didn't. I'm also surprised that I did not see more
people having this problem. Am I missing something that is obvious?

Sep 18 '06 #1
0 1535

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

Similar topics

1
by: Chris Huddle | last post by:
Is there a way to turn off optimistic concurrency in ASP.NET when updating a record via the oleDBdataAdapter/oleDBcommandBuilder? If you use the Microsoft ASP.NET tools you can turn it off and...
8
by: Mike Kelly | last post by:
I've chosen to implement the "optimistic concurrency" model in my application. To assist in that, I've added a ROWVERSION (TIMESTAMP) column to my main tables. I read the value of the column in my...
2
by: John | last post by:
In 'Data Adapter Configuration Wizard' for OleDbDataAdapter, there's a checkbox called 'Use optimistic concurrency' that allows to turn on/off the option. I don't use the wizard, I create...
2
by: stuart.d.jones | last post by:
Hi, I'm using a detailsview control with an SqlDataSource control. My Update query isn't working, and I've narrowed it down to the optimistic concurrency parameters - i.e. when I comment them...
6
by: shaanxxx | last post by:
I have global variable which is being shared between threads (problem is not connected with thread). Without using any mutex i have do some operation global variable in *consistent* way. ...
0
by: RKT | last post by:
I have a DataGridView bound to an MS Access table. This is a single- user application. When the User is adding or editing a row, the User may click on a Control elsewhere. That Control has context...
1
by: =?Utf-8?B?Qi4gQ2hlcm5pY2s=?= | last post by:
I was suddenly told to whip up a web project in ASP.Net 2.0. The last few weeks have been a crash course in new technology. I've done some 1.1 web work but it's been a while. The basics are...
1
by: =?Utf-8?B?Qi4gQ2hlcm5pY2s=?= | last post by:
(If I'm overlooking anything, please let me know.) First, my only concern is updating single records in a Detailsview using an ObjectDataSource. The target table has a timestamp field. Assume ...
8
by: Roger.Noreply | last post by:
Hi, Sql-Server 2000, 2005. A report fetches a lot of rows using the "WITH (ROWLOCK)" syntax (the sql is generated on the fly by a tool and not easily changeable). SELECT col1, col2 FROM mytab...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...

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.