Can I turn this feature off?
There is only 1 database per application. No one sharing it!
Also I do not have a date time field, should I?
Thx
_____
From: Patrice [mailto:
[email protected]]
Posted At: Wednesday, 8 December 2004 6:21 PM
Posted To: microsoft.public.dotnet.framework.adonet
Conversation: Concurrency Issues after a Delete has occurred in Access
Subject: Re: Concurrency Issues after a Delete has occurred in Access
These kind of false concurrency detection is AFAIK most often caused by
a delete criteria that returns no rows. The assumption is then that
someone else changed the row.
Try perhaps to do first a select to see if a row is returned. If not see
the SQL statement to find out whay. Most often this is a loss of
precision on datetime or float datatypes...
Good luck.
Patrice
--
"Daren Hawes" <
[email protected]> a écrit dans le message
de Standard. When I dragged the Table from the Server Explorer.
See Below
'
'OleDbConnection
'
Me.OleDbConnection.ConnectionString = "Jet OLEDB:Global Partial Bulk
Ops=2;Jet OLEDB:Registry Path=;Jet OLEDB
atabase L" & _
"ocking Mode=1;Jet OLEDB
atabase Password=;Data
Source=""D:\Clients\ABC\Air Train" & _
"
(Sherwell)\AirtrainNotifier\Version1\AirtrainNotifier\bin\ATNotifier.mdb
"";Passw" & _
"ord=;Jet OLEDB:Engine Type=5;Jet OLEDB:Global Bulk
Transactions=1;Provider=""Micr" & _
"osoft.Jet.OLEDB.4.0"";Jet OLEDB:System database=;Jet
OLEDB:SFP=False;Extended Pro" & _
"perties=;Mode=Share Deny None;Jet OLEDB:New Database Password=;Jet
OLEDB:Create " & _
"System Database=False;Jet OLEDB
on't Copy Locale on Compact=False;Jet
OLEDB:Com" & _
"pact Without Replica Repair=False;User ID=Admin;Jet OLEDB:Encrypt
Database=False" & _
""
'
'
'OleDbDeleteCommand1
'
Me.OleDbDeleteCommand1.CommandText = "DELETE FROM Reminders WHERE
(EventID = ?) AND (ReminderDate = ? OR ? IS NULL AND " & _
"ReminderDate IS NULL) AND (ReminderTime = ? OR ? IS NULL AND
ReminderTime IS NUL" & _
"L) AND (Route = ? OR ? IS NULL AND Route IS NULL)"
Me.OleDbDeleteCommand1.Connection = Me.OleDbConnection
Me.OleDbDeleteCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_EventID",
System.Data.OleDb.OleDbType.Integer, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "EventID", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbDeleteCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_ReminderDate",
System.Data.OleDb.OleDbType.DBDate, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "ReminderDate", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbDeleteCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_ReminderDate1",
System.Data.OleDb.OleDbType.DBDate, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "ReminderDate", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbDeleteCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_ReminderTime",
System.Data.OleDb.OleDbType.DBDate, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "ReminderTime", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbDeleteCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_ReminderTime1",
System.Data.OleDb.OleDbType.DBDate, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "ReminderTime", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbDeleteCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Route",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "Route", System.Data.DataRowVersion.Original, Nothing))
Me.OleDbDeleteCommand1.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Route1",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0,
Byte), "Route", System.Data.DataRowVersion.Original, Nothing))
'
_____
From: Miha Markic [MVP C#] [mailto:miha at rthand com]
Posted At: Tuesday, 7 December 2004 8:15 PM
Posted To: microsoft.public.dotnet.framework.adonet
Conversation: Concurrency Issues after a Delete has occurred in Access
Subject: Re: Concurrency Issues after a Delete has occurred in Access
How is your OleDbDataAdapter.DeleteCommand configured?
--
Miha Markic [MVP C#] - RightHand .NET consulting & development
SLODUG - Slovene Developer Users Group
www.rthand.com
Using the Update feature of the Data Adapter.
IE
OleDbDataAdaptor.fill(dataset) - Works Fine
Insert via Datagrid - Works Fine
OleDbDataAdapter.Update(dataset) - Works Fine
Delete via Datagrid
OleDbDataAdapter.Update(dataset) - ERROR
Have PK and Autonumber set fine. Can delete from Database itself.
?????
_____
From: Miha Markic [MVP C#] [mailto:miha at rthand com]
Posted At: Tuesday, 7 December 2004 6:21 PM
Posted To: microsoft.public.dotnet.framework.adonet
Conversation: Concurrency Issues after a Delete has occurred in Access
Subject: Re: Concurrency Issues after a Delete has occurred in Access
Hi Daren,
You are first deleting and then updating? Shouldn't you insert it and
not update it?
--
Miha Markic [MVP C#] - RightHand .NET consulting & development
SLODUG - Slovene Developer Users Group
www.rthand.com
Hi I get this error below.
-------------------
An unhandled exception of type 'System.Data.DBConcurrencyException'
occurred in system.data.dll
Additional information: Concurrency violation: the DeleteCommand
affected 0 records.
--------------------
I am using Access and this only happens when I delete data from a
Dataset and then try to Update it back to the BD.
Adding Works Well and Updating is fine, just deleting.
Any Ideas?
Thx