Strange deletion problem

J

John

Hi

I have a dataset/dataadpter set-up with access database. If I delete any
newly entered record they get deleted fine but if I try to delete existing
records which are there due to previous data conversion then I get this
error; 'Concurrency violation: the DeleteCommand affected 0 records.'. What
am I doing wrong here?

Thanks

Regards

PS: I have two yes/no field sin the database which I have defaulted to false
in the dataset.
 
J

John

Hi

I have just noticed that all the previous records (with problem in deleting)
have values of the format 04/01/2004 03:04:58 in a date/time field. When I
clear this field for an existing record then it deletes fine. Why would
deleting records be a problem with a data/time field having values in it?

Thanks

Regards
 
M

Miha Markic

Hi John,

John said:
Hi

I have just noticed that all the previous records (with problem in deleting)
have values of the format 04/01/2004 03:04:58 in a date/time field. When I
clear this field for an existing record then it deletes fine. Why would
deleting records be a problem with a data/time field having values in it?

I assume that delete statament checks WHERE field1 = originalField1 and ...
for all of the fields so it knows that the record hasn't changed before.
I suppose your table doesn't have a primary key.
 
J

John

It does have an autonumber id primary field. The date field has been added
just before the problem came up. I now realise that the date values are
there as a result of default set to now() and not due to data import
earlier. Also I have changed all values from 04/01/ 2003 12:30:02 to date
only i.e. 04/10/2003 and it works fine. So it appears to be something to do
with full date/time format.

Regards
 
J

John

It is something that I let the dataadapter generate for me but here is the
relevant code is given below. The problematic field is Date Created.

In my application, I am getting the error when updating after record
deletion using; daContacts.Update(ds.tblContacts).

Thanks


'
'daContacts
'
daContacts.DeleteCommand = delcomContacts
daContacts.InsertCommand = inscomContacts
daContacts.SelectCommand = selcomContacts
daContacts.TableMappings.AddRange(New System.Data.Common.DataTableMapping()
{New System.Data.Common.DataTableMapping("Table", "tblContacts", New
System.Data.Common.DataColumnMapping() {New
System.Data.Common.DataColumnMapping("Active", "Active"), New
System.Data.Common.DataColumnMapping("Assistant", "Assistant"), New
System.Data.Common.DataColumnMapping("Assistant Tel", "Assistant Tel"), New
System.Data.Common.DataColumnMapping("Birthday", "Birthday"), New
System.Data.Common.DataColumnMapping("Children", "Children"), New
System.Data.Common.DataColumnMapping("Company", "Company"), New
System.Data.Common.DataColumnMapping("Company_ID", "Company_ID"), New
System.Data.Common.DataColumnMapping("Company_Type", "Company_Type"), New
System.Data.Common.DataColumnMapping("Contact_Type", "Contact_Type"), New
System.Data.Common.DataColumnMapping("Created By", "Created By"), New
System.Data.Common.DataColumnMapping("Date Created", "Date Created"), New
System.Data.Common.DataColumnMapping("Date Modified", "Date Modified"), New
System.Data.Common.DataColumnMapping("Department", "Department"), New
System.Data.Common.DataColumnMapping("Email", "Email"), New
System.Data.Common.DataColumnMapping("EMail2", "EMail2"), New
System.Data.Common.DataColumnMapping("Fax", "Fax"), New
System.Data.Common.DataColumnMapping("Forenames", "Forenames"), New
System.Data.Common.DataColumnMapping("Home_Address", "Home_Address"), New
System.Data.Common.DataColumnMapping("Home_Country", "Home_Country"), New
System.Data.Common.DataColumnMapping("Home_County", "Home_County"), New
System.Data.Common.DataColumnMapping("Home_Email", "Home_Email"), New
System.Data.Common.DataColumnMapping("Home_Postcode", "Home_Postcode"), New
System.Data.Common.DataColumnMapping("Home_Tel", "Home_Tel"), New
System.Data.Common.DataColumnMapping("ID", "ID"), New
System.Data.Common.DataColumnMapping("Job_Title", "Job_Title"), New
System.Data.Common.DataColumnMapping("Mailing", "Mailing"), New
System.Data.Common.DataColumnMapping("Mobile", "Mobile"), New
System.Data.Common.DataColumnMapping("Modified By", "Modified By"), New
System.Data.Common.DataColumnMapping("Remarks", "Remarks"), New
System.Data.Common.DataColumnMapping("Sex", "Sex"), New
System.Data.Common.DataColumnMapping("Spouse", "Spouse"), New
System.Data.Common.DataColumnMapping("Surname", "Surname"), New
System.Data.Common.DataColumnMapping("Tel", "Tel"), New
System.Data.Common.DataColumnMapping("Title", "Title"), New
System.Data.Common.DataColumnMapping("Unique_ID", "Unique_ID"), New
System.Data.Common.DataColumnMapping("Web", "Web")})})
daContacts.UpdateCommand = updcomContacts
'
'delcomContacts
'
delcomContacts.CommandText = "DELETE FROM tblContacts WHERE (ID = ?) AND
(Active = ?) AND (Assistant = ? OR ? I" & _
"S NULL AND Assistant IS NULL) AND ([Assistant Tel] = ? OR ? IS NULL AND
[Assista" & _
"nt Tel] IS NULL) AND (Birthday = ? OR ? IS NULL AND Birthday IS NULL) AND
(Child" & _
"ren = ? OR ? IS NULL AND Children IS NULL) AND (Company = ? OR ? IS NULL
AND Com" & _
"pany IS NULL) AND (Company_ID = ? OR ? IS NULL AND Company_ID IS NULL) AND
(Comp" & _
"any_Type = ? OR ? IS NULL AND Company_Type IS NULL) AND (Contact_Type = ?
OR ? I" & _
"S NULL AND Contact_Type IS NULL) AND ([Created By] = ? OR ? IS NULL AND
[Created" & _
" By] IS NULL) AND ([Date Created] = ? OR ? IS NULL AND [Date Created] IS
NULL) A" & _
"ND ([Date Modified] = ? OR ? IS NULL AND [Date Modified] IS NULL) AND
(Departmen" & _
"t = ? OR ? IS NULL AND Department IS NULL) AND (EMail2 = ? OR ? IS NULL AND
EMai" & _
"l2 IS NULL) AND (Email = ? OR ? IS NULL AND Email IS NULL) AND (Fax = ? OR
? IS " & _
"NULL AND Fax IS NULL) AND (Forenames = ? OR ? IS NULL AND Forenames IS
NULL) AND" & _
" (Home_Address = ? OR ? IS NULL AND Home_Address IS NULL) AND (Home_Country
= ? " & _
"OR ? IS NULL AND Home_Country IS NULL) AND (Home_County = ? OR ? IS NULL
AND Hom" & _
"e_County IS NULL) AND (Home_Email = ? OR ? IS NULL AND Home_Email IS NULL)
AND (" & _
"Home_Postcode = ? OR ? IS NULL AND Home_Postcode IS NULL) AND (Home_Tel = ?
OR ?" & _
" IS NULL AND Home_Tel IS NULL) AND (Job_Title = ? OR ? IS NULL AND
Job_Title IS " & _
"NULL) AND (Mailing = ?) AND (Mobile = ? OR ? IS NULL AND Mobile IS NULL)
AND ([M" & _
"odified By] = ? OR ? IS NULL AND [Modified By] IS NULL) AND (Sex = ? OR ?
IS NUL" & _
"L AND Sex IS NULL) AND (Spouse = ? OR ? IS NULL AND Spouse IS NULL) AND
(Surname" & _
" = ? OR ? IS NULL AND Surname IS NULL) AND (Tel = ? OR ? IS NULL AND Tel IS
NULL" & _
") AND (Title = ? OR ? IS NULL AND Title IS NULL) AND (Unique_ID = ? OR ? IS
NULL" & _
" AND Unique_ID IS NULL) AND (Web = ? OR ? IS NULL AND Web IS NULL)"
Me.delcomContacts.Connection = dbConContacts
Me.delcomContacts.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_ID",
System.Data.OleDb.OleDbType.Integer, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"ID", System.Data.DataRowVersion.Original, Nothing))
Me.delcomContacts.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Active",
System.Data.OleDb.OleDbType.Boolean, 2,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"Active", System.Data.DataRowVersion.Original, Nothing))
Me.delcomContacts.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Assistant",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"Assistant", System.Data.DataRowVersion.Original, Nothing))
Me.delcomContacts.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Assistant1",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"Assistant", System.Data.DataRowVersion.Original, Nothing))
Me.delcomContacts.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Assistant_Tel",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"Assistant Tel", System.Data.DataRowVersion.Original, Nothing))
Me.delcomContacts.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Assistant_Tel1",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"Assistant Tel", System.Data.DataRowVersion.Original, Nothing))
Me.delcomContacts.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Birthday",
System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input,
False, CType(0, Byte), CType(0, Byte), "Birthday",
System.Data.DataRowVersion.Original, Nothing))
Me.delcomContacts.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Birthday1",
System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input,
False, CType(0, Byte), CType(0, Byte), "Birthday",
System.Data.DataRowVersion.Original, Nothing))
Me.delcomContacts.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Children",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"Children", System.Data.DataRowVersion.Original, Nothing))
Me.delcomContacts.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Children1",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"Children", System.Data.DataRowVersion.Original, Nothing))
Me.delcomContacts.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Company",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"Company", System.Data.DataRowVersion.Original, Nothing))
Me.delcomContacts.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Company1",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"Company", System.Data.DataRowVersion.Original, Nothing))
Me.delcomContacts.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Company_ID",
System.Data.OleDb.OleDbType.Integer, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"Company_ID", System.Data.DataRowVersion.Original, Nothing))
Me.delcomContacts.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Company_ID1",
System.Data.OleDb.OleDbType.Integer, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"Company_ID", System.Data.DataRowVersion.Original, Nothing))
Me.delcomContacts.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Company_Type",
System.Data.OleDb.OleDbType.VarWChar, 1,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"Company_Type", System.Data.DataRowVersion.Original, Nothing))
Me.delcomContacts.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Company_Type1",
System.Data.OleDb.OleDbType.VarWChar, 1,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"Company_Type", System.Data.DataRowVersion.Original, Nothing))
Me.delcomContacts.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Contact_Type",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"Contact_Type", System.Data.DataRowVersion.Original, Nothing))
Me.delcomContacts.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Contact_Type1",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"Contact_Type", System.Data.DataRowVersion.Original, Nothing))
Me.delcomContacts.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Created_By",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"Created By", System.Data.DataRowVersion.Original, Nothing))
Me.delcomContacts.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Created_By1",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"Created By", System.Data.DataRowVersion.Original, Nothing))
Me.delcomContacts.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Date_Created",
System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input,
False, CType(0, Byte), CType(0, Byte), "Date Created",
System.Data.DataRowVersion.Original, Nothing))
Me.delcomContacts.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Date_Created1",
System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input,
False, CType(0, Byte), CType(0, Byte), "Date Created",
System.Data.DataRowVersion.Original, Nothing))
Me.delcomContacts.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Date_Modified",
System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input,
False, CType(0, Byte), CType(0, Byte), "Date Modified",
System.Data.DataRowVersion.Original, Nothing))
Me.delcomContacts.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Date_Modified1",
System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input,
False, CType(0, Byte), CType(0, Byte), "Date Modified",
System.Data.DataRowVersion.Original, Nothing))
Me.delcomContacts.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Department",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"Department", System.Data.DataRowVersion.Original, Nothing))
Me.delcomContacts.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Orginal_Department1",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"Department", System.Data.DataRowVersion.Original, Nothing))
Me.delcomContacts.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_EMail2",
System.Data.OleDb.OleDbType.VarWChar, 80,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"EMail2", System.Data.DataRowVersion.Original, Nothing))
Me.delcomContacts.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_EMail21",
System.Data.OleDb.OleDbType.VarWChar, 80,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"EMail2", System.Data.DataRowVersion.Original, Nothing))
Me.delcomContacts.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Email",
System.Data.OleDb.OleDbType.VarWChar, 80,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"Email", System.Data.DataRowVersion.Original, Nothing))
Me.delcomContacts.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Email1",
System.Data.OleDb.OleDbType.VarWChar, 80,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"Email", System.Data.DataRowVersion.Original, Nothing))
Me.delcomContacts.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Fax",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"Fax", System.Data.DataRowVersion.Original, Nothing))
Me.delcomContacts.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Fax1",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"Fax", System.Data.DataRowVersion.Original, Nothing))
Me.delcomContacts.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Forenames",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"Forenames", System.Data.DataRowVersion.Original, Nothing))
Me.delcomContacts.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Forenames1",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"Forenames", System.Data.DataRowVersion.Original, Nothing))
Me.delcomContacts.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Home_Address",
System.Data.OleDb.OleDbType.VarWChar, 255,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"Home_Address", System.Data.DataRowVersion.Original, Nothing))
Me.delcomContacts.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Home_Address1",
System.Data.OleDb.OleDbType.VarWChar, 255,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"Home_Address", System.Data.DataRowVersion.Original, Nothing))
Me.delcomContacts.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Home_Country",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"Home_Country", System.Data.DataRowVersion.Original, Nothing))
Me.delcomContacts.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Home_Country1",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"Home_Country", System.Data.DataRowVersion.Original, Nothing))
Me.delcomContacts.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Home_County",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"Home_County", System.Data.DataRowVersion.Original, Nothing))
Me.delcomContacts.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Home_County1",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"Home_County", System.Data.DataRowVersion.Original, Nothing))
Me.delcomContacts.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Home_Email",
System.Data.OleDb.OleDbType.VarWChar, 80,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"Home_Email", System.Data.DataRowVersion.Original, Nothing))
Me.delcomContacts.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Home_Email1",
System.Data.OleDb.OleDbType.VarWChar, 80,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"Home_Email", System.Data.DataRowVersion.Original, Nothing))
Me.delcomContacts.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Home_Postcode",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"Home_Postcode", System.Data.DataRowVersion.Original, Nothing))
Me.delcomContacts.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Home_Postcode1",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"Home_Postcode", System.Data.DataRowVersion.Original, Nothing))
Me.delcomContacts.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Home_Tel",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"Home_Tel", System.Data.DataRowVersion.Original, Nothing))
Me.delcomContacts.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Home_Tel1",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"Home_Tel", System.Data.DataRowVersion.Original, Nothing))
Me.delcomContacts.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Job_Title",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"Job_Title", System.Data.DataRowVersion.Original, Nothing))
Me.delcomContacts.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Job_Title1",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"Job_Title", System.Data.DataRowVersion.Original, Nothing))
Me.delcomContacts.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Mailing",
System.Data.OleDb.OleDbType.Boolean, 2,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"Mailing", System.Data.DataRowVersion.Original, Nothing))
Me.delcomContacts.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Mobile",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"Mobile", System.Data.DataRowVersion.Original, Nothing))
Me.delcomContacts.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Mobile1",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"Mobile", System.Data.DataRowVersion.Original, Nothing))
Me.delcomContacts.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Modified_By",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"Modified By", System.Data.DataRowVersion.Original, Nothing))
Me.delcomContacts.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Modified_By1",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"Modified By", System.Data.DataRowVersion.Original, Nothing))
Me.delcomContacts.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Sex",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"Sex", System.Data.DataRowVersion.Original, Nothing))
Me.delcomContacts.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Sex1",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"Sex", System.Data.DataRowVersion.Original, Nothing))
Me.delcomContacts.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Spouse",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"Spouse", System.Data.DataRowVersion.Original, Nothing))
Me.delcomContacts.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Spouse1",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"Spouse", System.Data.DataRowVersion.Original, Nothing))
Me.delcomContacts.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Surname",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"Surname", System.Data.DataRowVersion.Original, Nothing))
Me.delcomContacts.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Surname1",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"Surname", System.Data.DataRowVersion.Original, Nothing))
Me.delcomContacts.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Tel",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"Tel", System.Data.DataRowVersion.Original, Nothing))
Me.delcomContacts.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Tel1",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"Tel", System.Data.DataRowVersion.Original, Nothing))
Me.delcomContacts.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Title",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"Title", System.Data.DataRowVersion.Original, Nothing))
Me.delcomContacts.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Title1",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"Title", System.Data.DataRowVersion.Original, Nothing))
Me.delcomContacts.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Unique_ID",
System.Data.OleDb.OleDbType.VarWChar, 10,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"Unique_ID", System.Data.DataRowVersion.Original, Nothing))
Me.delcomContacts.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Unique_ID1",
System.Data.OleDb.OleDbType.VarWChar, 10,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"Unique_ID", System.Data.DataRowVersion.Original, Nothing))
Me.delcomContacts.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Web",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"Web", System.Data.DataRowVersion.Original, Nothing))
Me.delcomContacts.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Web1",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"Web", System.Data.DataRowVersion.Original, Nothing))
 
M

Miha Markic

Hi John,

Change the parameter that holds datetime field (Date Created for example)
from
System.Data.OleDb.OleDbType.DBDate

to

System.Data.OleDb.OleDbType.Date

And it should start working.
 
J

John

Many tanks. That worked. Much obliged. I wouldn't have been able to figure
it out so quickly. Thanks again.

Regards
 
M

Miha Markic

Hi John,

John said:
Many tanks. That worked. Much obliged. I wouldn't have been able to figure
it out so quickly. Thanks again.

Yes, it is a well hidden error of command builder.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top