Re: Concurrency violation



On Fri, 19 Sep 2008 08:09:44 -0400, Zhuo Li wrote:

Thank you for your reply. I think that it is something to do with the
datetime field and the dataset. When the dataset tries to save a row to
the database, it compares its "Original data"of the row with what is in
the database. This comparison always result in difference in the
datetime field. If there were a simple solution, there would be
something in the dataset configuration to set the rule of comparing two
datetime values only upto second. Any idea?

I can describe a problem I had and perhaps that will help you.

DateTimePicker associated with field. Field was sometime null in the
database. When you picked a new row if (and only if) the field was null
the control got an is null exception and 'rejected' the change of
position. I worked around this by disconnecting the picker from the
database and manually setting it with an onchange event on the
datasource. Very clunky.

I don't get the second message, the difference between two dates is a
timespan. If they are different and you are changing them the database
does not care. If you want to make them null then the automatic
database build will create a method SetFeildNull() and it can be checked
with IsFieldNull().

Ken
.



Relevant Pages

  • Re: Date vs DateTime
    ... The reason why the WHEREs will not handle our DateTime is that the database ... holds accurate information down to the 6th sig decimal figure on the ... and a DateTime field was set by the other application, ... it does make a difference when you are specifing them as ...
    (microsoft.public.dotnet.framework)
  • Re: Extracting Time from the SQL DateTime field.
    ... > Any help on extracting the time part from the datetime field in SQL ... > even though i had entered only the time part in the database when i ... > Visit Topic URL to contact author (reg. ...
    (comp.databases.ms-sqlserver)
  • Extracting Time from the SQL DateTime field.
    ... Any help on extracting the time part from the datetime field in SQL ... even though i had entered only the time part in the database when i ...
    (comp.databases.ms-sqlserver)
  • Re: Concurrency violation
    ... database, it compares its "Original data"of the row with what is in the ... This comparison always result in difference in the datetime field. ... oAdapter.UpdateCommand.CommandText is like: "update aTable set ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Static pages vs CMS and the effect on SEs
    ... your site locally, and upload all pages. ... The major con of a database if you really don't need it is that your ... My site consists of several XML files (one file can include zero or more ... A second program compares each file with a local copy of my site. ...
    (alt.internet.search-engines)