J
John
Hi
I have finally managed to create dataadapter and related commands. Code
below. My questions are; how do I now pass values to these commands and how
do I execute these commands?
Thanks
Regards
'
'daTasks
'
Me.daTasks.DeleteCommand = Me.delTask
Me.daTasks.InsertCommand = Me.insTask
Me.daTasks.SelectCommand = Me.salTask
Me.daTasks.TableMappings.AddRange(New System.Data.Common.DataTableMapping()
{New System.Data.Common.DataTableMapping("Table", "tblTasks", New
System.Data.Common.DataColumnMapping() {New
System.Data.Common.DataColumnMapping("Activity", "Activity"), New
System.Data.Common.DataColumnMapping("ChangeStamp", "ChangeStamp"), New
System.Data.Common.DataColumnMapping("ClientID", "ClientID"), New
System.Data.Common.DataColumnMapping("DateCompleted", "DateCompleted"), New
System.Data.Common.DataColumnMapping("DateEnded", "DateEnded"), New
System.Data.Common.DataColumnMapping("DateStarted", "DateStarted"), New
System.Data.Common.DataColumnMapping("Detail", "Detail"), New
System.Data.Common.DataColumnMapping("ID", "ID"), New
System.Data.Common.DataColumnMapping("Subject", "Subject"), New
System.Data.Common.DataColumnMapping("TimeCompleted", "TimeCompleted"), New
System.Data.Common.DataColumnMapping("TimeEnded", "TimeEnded"), New
System.Data.Common.DataColumnMapping("TimeRemind", "TimeRemind"), New
System.Data.Common.DataColumnMapping("TimeStarted", "TimeStarted"), New
System.Data.Common.DataColumnMapping("User", "User")})})
Me.daTasks.UpdateCommand = Me.updTask
'
'insTask
'
Me.insTask.CommandText = "INSERT INTO tblTasks(Activity, ChangeStamp,
ClientID, DateCompleted, DateEnded, D" & _
"ateStarted, Detail, Subject, TimeCompleted, TimeEnded, TimeRemind,
TimeStarted, " & _
"[User]) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"
Me.insTask.Connection = dbConContacts
Me.insTask.Parameters.Add(New System.Data.OleDb.OleDbParameter("Activity",
System.Data.OleDb.OleDbType.VarWChar, 25, "Activity"))
Me.insTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("ChangeStamp",
System.Data.OleDb.OleDbType.DBDate, 0, "ChangeStamp"))
Me.insTask.Parameters.Add(New System.Data.OleDb.OleDbParameter("ClientID",
System.Data.OleDb.OleDbType.Integer, 0, "ClientID"))
Me.insTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("DateCompleted",
System.Data.OleDb.OleDbType.DBDate, 0, "DateCompleted"))
Me.insTask.Parameters.Add(New System.Data.OleDb.OleDbParameter("DateEnded",
System.Data.OleDb.OleDbType.DBDate, 0, "DateEnded"))
Me.insTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("DateStarted",
System.Data.OleDb.OleDbType.DBDate, 0, "DateStarted"))
Me.insTask.Parameters.Add(New System.Data.OleDb.OleDbParameter("Detail",
System.Data.OleDb.OleDbType.VarWChar, 0, "Detail"))
Me.insTask.Parameters.Add(New System.Data.OleDb.OleDbParameter("Subject",
System.Data.OleDb.OleDbType.VarWChar, 150, "Subject"))
Me.insTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("TimeCompleted",
System.Data.OleDb.OleDbType.DBDate, 0, "TimeCompleted"))
Me.insTask.Parameters.Add(New System.Data.OleDb.OleDbParameter("TimeEnded",
System.Data.OleDb.OleDbType.DBDate, 0, "TimeEnded"))
Me.insTask.Parameters.Add(New System.Data.OleDb.OleDbParameter("TimeRemind",
System.Data.OleDb.OleDbType.DBDate, 0, "TimeRemind"))
Me.insTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("TimeStarted",
System.Data.OleDb.OleDbType.DBDate, 0, "TimeStarted"))
Me.insTask.Parameters.Add(New System.Data.OleDb.OleDbParameter("User",
System.Data.OleDb.OleDbType.VarWChar, 50, "User"))
'
'updTask
'
Me.updTask.CommandText = "UPDATE tblTasks SET Activity = ?, ChangeStamp = ?,
ClientID = ?, DateCompleted = " & _
"?, DateEnded = ?, DateStarted = ?, Detail = ?, Subject = ?, TimeCompleted =
?, T" & _
"imeEnded = ?, TimeRemind = ?, TimeStarted = ?, [User] = ? WHERE (ID = ?)
AND (Ac" & _
"tivity = ? OR ? IS NULL AND Activity IS NULL) AND (ChangeStamp = ?) AND
(ClientI" & _
"D = ? OR ? IS NULL AND ClientID IS NULL) AND (DateCompleted = ? OR ? IS
NULL AND" & _
" DateCompleted IS NULL) AND (DateEnded = ? OR ? IS NULL AND DateEnded IS
NULL) A" & _
"ND (DateStarted = ? OR ? IS NULL AND DateStarted IS NULL) AND (Subject = ?
OR ? " & _
"IS NULL AND Subject IS NULL) AND (TimeCompleted = ? OR ? IS NULL AND
TimeComplet" & _
"ed IS NULL) AND (TimeEnded = ? OR ? IS NULL AND TimeEnded IS NULL) AND
(TimeRemi" & _
"nd = ? OR ? IS NULL AND TimeRemind IS NULL) AND (TimeStarted = ? OR ? IS
NULL AN" & _
"D TimeStarted IS NULL) AND ([User] = ? OR ? IS NULL AND [User] IS NULL)"
Me.updTask.Connection = dbConContacts
Me.updTask.Parameters.Add(New System.Data.OleDb.OleDbParameter("Activity",
System.Data.OleDb.OleDbType.VarWChar, 25, "Activity"))
Me.updTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("ChangeStamp",
System.Data.OleDb.OleDbType.DBDate, 0, "ChangeStamp"))
Me.updTask.Parameters.Add(New System.Data.OleDb.OleDbParameter("ClientID",
System.Data.OleDb.OleDbType.Integer, 0, "ClientID"))
Me.updTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("DateCompleted",
System.Data.OleDb.OleDbType.DBDate, 0, "DateCompleted"))
Me.updTask.Parameters.Add(New System.Data.OleDb.OleDbParameter("DateEnded",
System.Data.OleDb.OleDbType.DBDate, 0, "DateEnded"))
Me.updTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("DateStarted",
System.Data.OleDb.OleDbType.DBDate, 0, "DateStarted"))
Me.updTask.Parameters.Add(New System.Data.OleDb.OleDbParameter("Detail",
System.Data.OleDb.OleDbType.VarWChar, 0, "Detail"))
Me.updTask.Parameters.Add(New System.Data.OleDb.OleDbParameter("Subject",
System.Data.OleDb.OleDbType.VarWChar, 150, "Subject"))
Me.updTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("TimeCompleted",
System.Data.OleDb.OleDbType.DBDate, 0, "TimeCompleted"))
Me.updTask.Parameters.Add(New System.Data.OleDb.OleDbParameter("TimeEnded",
System.Data.OleDb.OleDbType.DBDate, 0, "TimeEnded"))
Me.updTask.Parameters.Add(New System.Data.OleDb.OleDbParameter("TimeRemind",
System.Data.OleDb.OleDbType.DBDate, 0, "TimeRemind"))
Me.updTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("TimeStarted",
System.Data.OleDb.OleDbType.DBDate, 0, "TimeStarted"))
Me.updTask.Parameters.Add(New System.Data.OleDb.OleDbParameter("User",
System.Data.OleDb.OleDbType.VarWChar, 50, "User"))
Me.updTask.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.updTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Activity",
System.Data.OleDb.OleDbType.VarWChar, 25,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"Activity", System.Data.DataRowVersion.Original, Nothing))
Me.updTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Activity1",
System.Data.OleDb.OleDbType.VarWChar, 25,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"Activity", System.Data.DataRowVersion.Original, Nothing))
Me.updTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_ChangeStamp",
System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input,
False, CType(0, Byte), CType(0, Byte), "ChangeStamp",
System.Data.DataRowVersion.Original, Nothing))
Me.updTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_ClientID",
System.Data.OleDb.OleDbType.Integer, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"ClientID", System.Data.DataRowVersion.Original, Nothing))
Me.updTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_ClientID1",
System.Data.OleDb.OleDbType.Integer, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"ClientID", System.Data.DataRowVersion.Original, Nothing))
Me.updTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_DateCompleted",
System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input,
False, CType(0, Byte), CType(0, Byte), "DateCompleted",
System.Data.DataRowVersion.Original, Nothing))
Me.updTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_DateCompleted1",
System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input,
False, CType(0, Byte), CType(0, Byte), "DateCompleted",
System.Data.DataRowVersion.Original, Nothing))
Me.updTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_DateEnded",
System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input,
False, CType(0, Byte), CType(0, Byte), "DateEnded",
System.Data.DataRowVersion.Original, Nothing))
Me.updTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_DateEnded1",
System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input,
False, CType(0, Byte), CType(0, Byte), "DateEnded",
System.Data.DataRowVersion.Original, Nothing))
Me.updTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_DateStarted",
System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input,
False, CType(0, Byte), CType(0, Byte), "DateStarted",
System.Data.DataRowVersion.Original, Nothing))
Me.updTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_DateStarted1",
System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input,
False, CType(0, Byte), CType(0, Byte), "DateStarted",
System.Data.DataRowVersion.Original, Nothing))
Me.updTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Subject",
System.Data.OleDb.OleDbType.VarWChar, 150,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"Subject", System.Data.DataRowVersion.Original, Nothing))
Me.updTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Subject1",
System.Data.OleDb.OleDbType.VarWChar, 150,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"Subject", System.Data.DataRowVersion.Original, Nothing))
Me.updTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_TimeCompleted",
System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input,
False, CType(0, Byte), CType(0, Byte), "TimeCompleted",
System.Data.DataRowVersion.Original, Nothing))
Me.updTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_TimeCompleted1",
System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input,
False, CType(0, Byte), CType(0, Byte), "TimeCompleted",
System.Data.DataRowVersion.Original, Nothing))
Me.updTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_TimeEnded",
System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input,
False, CType(0, Byte), CType(0, Byte), "TimeEnded",
System.Data.DataRowVersion.Original, Nothing))
Me.updTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_TimeEnded1",
System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input,
False, CType(0, Byte), CType(0, Byte), "TimeEnded",
System.Data.DataRowVersion.Original, Nothing))
Me.updTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_TimeRemind",
System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input,
False, CType(0, Byte), CType(0, Byte), "TimeRemind",
System.Data.DataRowVersion.Original, Nothing))
Me.updTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_TimeRemind1",
System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input,
False, CType(0, Byte), CType(0, Byte), "TimeRemind",
System.Data.DataRowVersion.Original, Nothing))
Me.updTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_TimeStarted",
System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input,
False, CType(0, Byte), CType(0, Byte), "TimeStarted",
System.Data.DataRowVersion.Original, Nothing))
Me.updTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_TimeStarted1",
System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input,
False, CType(0, Byte), CType(0, Byte), "TimeStarted",
System.Data.DataRowVersion.Original, Nothing))
Me.updTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_User",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"User", System.Data.DataRowVersion.Original, Nothing))
Me.updTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_User1",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"User", System.Data.DataRowVersion.Original, Nothing))
'
'delTask
'
Me.delTask.CommandText = "DELETE FROM tblTasks WHERE (ID = ?) AND (Activity
= ? OR ? IS NULL AND Activity I" & _
"S NULL) AND (ChangeStamp = ?) AND (ClientID = ? OR ? IS NULL AND ClientID
IS NUL" & _
"L) AND (DateCompleted = ? OR ? IS NULL AND DateCompleted IS NULL) AND
(DateEnded" & _
" = ? OR ? IS NULL AND DateEnded IS NULL) AND (DateStarted = ? OR ? IS NULL
AND D" & _
"ateStarted IS NULL) AND (Subject = ? OR ? IS NULL AND Subject IS NULL) AND
(Time" & _
"Completed = ? OR ? IS NULL AND TimeCompleted IS NULL) AND (TimeEnded = ? OR
? IS" & _
" NULL AND TimeEnded IS NULL) AND (TimeRemind = ? OR ? IS NULL AND
TimeRemind IS " & _
"NULL) AND (TimeStarted = ? OR ? IS NULL AND TimeStarted IS NULL) AND
([User] = ?" & _
" OR ? IS NULL AND [User] IS NULL)"
Me.delTask.Connection = dbConContacts
Me.delTask.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.delTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Activity",
System.Data.OleDb.OleDbType.VarWChar, 25,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"Activity", System.Data.DataRowVersion.Original, Nothing))
Me.delTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Activity1",
System.Data.OleDb.OleDbType.VarWChar, 25,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"Activity", System.Data.DataRowVersion.Original, Nothing))
Me.delTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_ChangeStamp",
System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input,
False, CType(0, Byte), CType(0, Byte), "ChangeStamp",
System.Data.DataRowVersion.Original, Nothing))
Me.delTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_ClientID",
System.Data.OleDb.OleDbType.Integer, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"ClientID", System.Data.DataRowVersion.Original, Nothing))
Me.delTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_ClientID1",
System.Data.OleDb.OleDbType.Integer, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"ClientID", System.Data.DataRowVersion.Original, Nothing))
Me.delTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_DateCompleted",
System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input,
False, CType(0, Byte), CType(0, Byte), "DateCompleted",
System.Data.DataRowVersion.Original, Nothing))
Me.delTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_DateCompleted1",
System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input,
False, CType(0, Byte), CType(0, Byte), "DateCompleted",
System.Data.DataRowVersion.Original, Nothing))
Me.delTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_DateEnded",
System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input,
False, CType(0, Byte), CType(0, Byte), "DateEnded",
System.Data.DataRowVersion.Original, Nothing))
Me.delTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_DateEnded1",
System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input,
False, CType(0, Byte), CType(0, Byte), "DateEnded",
System.Data.DataRowVersion.Original, Nothing))
Me.delTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_DateStarted",
System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input,
False, CType(0, Byte), CType(0, Byte), "DateStarted",
System.Data.DataRowVersion.Original, Nothing))
Me.delTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_DateStarted1",
System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input,
False, CType(0, Byte), CType(0, Byte), "DateStarted",
System.Data.DataRowVersion.Original, Nothing))
Me.delTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Subject",
System.Data.OleDb.OleDbType.VarWChar, 150,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"Subject", System.Data.DataRowVersion.Original, Nothing))
Me.delTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Subject1",
System.Data.OleDb.OleDbType.VarWChar, 150,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"Subject", System.Data.DataRowVersion.Original, Nothing))
Me.delTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_TimeCompleted",
System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input,
False, CType(0, Byte), CType(0, Byte), "TimeCompleted",
System.Data.DataRowVersion.Original, Nothing))
Me.delTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_TimeCompleted1",
System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input,
False, CType(0, Byte), CType(0, Byte), "TimeCompleted",
System.Data.DataRowVersion.Original, Nothing))
Me.delTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_TimeEnded",
System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input,
False, CType(0, Byte), CType(0, Byte), "TimeEnded",
System.Data.DataRowVersion.Original, Nothing))
Me.delTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_TimeEnded1",
System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input,
False, CType(0, Byte), CType(0, Byte), "TimeEnded",
System.Data.DataRowVersion.Original, Nothing))
Me.delTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_TimeRemind",
System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input,
False, CType(0, Byte), CType(0, Byte), "TimeRemind",
System.Data.DataRowVersion.Original, Nothing))
Me.delTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_TimeRemind1",
System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input,
False, CType(0, Byte), CType(0, Byte), "TimeRemind",
System.Data.DataRowVersion.Original, Nothing))
Me.delTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_TimeStarted",
System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input,
False, CType(0, Byte), CType(0, Byte), "TimeStarted",
System.Data.DataRowVersion.Original, Nothing))
Me.delTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_TimeStarted1",
System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input,
False, CType(0, Byte), CType(0, Byte), "TimeStarted",
System.Data.DataRowVersion.Original, Nothing))
Me.delTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_User",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"User", System.Data.DataRowVersion.Original, Nothing))
Me.delTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_User1",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"User", System.Data.DataRowVersion.Original, Nothing))
'
'selTask
'
Me.selTask.CommandText = "SELECT Activity, ChangeStamp, ClientID,
DateCompleted, DateEnded, DateStarted, De" & _
"tail, ID, Subject, TimeCompleted, TimeEnded, TimeRemind, TimeStarted,
[User] FRO" & _
"M tblTasks"
Me.selTask.Connection = dbConContacts
I have finally managed to create dataadapter and related commands. Code
below. My questions are; how do I now pass values to these commands and how
do I execute these commands?
Thanks
Regards
'
'daTasks
'
Me.daTasks.DeleteCommand = Me.delTask
Me.daTasks.InsertCommand = Me.insTask
Me.daTasks.SelectCommand = Me.salTask
Me.daTasks.TableMappings.AddRange(New System.Data.Common.DataTableMapping()
{New System.Data.Common.DataTableMapping("Table", "tblTasks", New
System.Data.Common.DataColumnMapping() {New
System.Data.Common.DataColumnMapping("Activity", "Activity"), New
System.Data.Common.DataColumnMapping("ChangeStamp", "ChangeStamp"), New
System.Data.Common.DataColumnMapping("ClientID", "ClientID"), New
System.Data.Common.DataColumnMapping("DateCompleted", "DateCompleted"), New
System.Data.Common.DataColumnMapping("DateEnded", "DateEnded"), New
System.Data.Common.DataColumnMapping("DateStarted", "DateStarted"), New
System.Data.Common.DataColumnMapping("Detail", "Detail"), New
System.Data.Common.DataColumnMapping("ID", "ID"), New
System.Data.Common.DataColumnMapping("Subject", "Subject"), New
System.Data.Common.DataColumnMapping("TimeCompleted", "TimeCompleted"), New
System.Data.Common.DataColumnMapping("TimeEnded", "TimeEnded"), New
System.Data.Common.DataColumnMapping("TimeRemind", "TimeRemind"), New
System.Data.Common.DataColumnMapping("TimeStarted", "TimeStarted"), New
System.Data.Common.DataColumnMapping("User", "User")})})
Me.daTasks.UpdateCommand = Me.updTask
'
'insTask
'
Me.insTask.CommandText = "INSERT INTO tblTasks(Activity, ChangeStamp,
ClientID, DateCompleted, DateEnded, D" & _
"ateStarted, Detail, Subject, TimeCompleted, TimeEnded, TimeRemind,
TimeStarted, " & _
"[User]) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"
Me.insTask.Connection = dbConContacts
Me.insTask.Parameters.Add(New System.Data.OleDb.OleDbParameter("Activity",
System.Data.OleDb.OleDbType.VarWChar, 25, "Activity"))
Me.insTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("ChangeStamp",
System.Data.OleDb.OleDbType.DBDate, 0, "ChangeStamp"))
Me.insTask.Parameters.Add(New System.Data.OleDb.OleDbParameter("ClientID",
System.Data.OleDb.OleDbType.Integer, 0, "ClientID"))
Me.insTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("DateCompleted",
System.Data.OleDb.OleDbType.DBDate, 0, "DateCompleted"))
Me.insTask.Parameters.Add(New System.Data.OleDb.OleDbParameter("DateEnded",
System.Data.OleDb.OleDbType.DBDate, 0, "DateEnded"))
Me.insTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("DateStarted",
System.Data.OleDb.OleDbType.DBDate, 0, "DateStarted"))
Me.insTask.Parameters.Add(New System.Data.OleDb.OleDbParameter("Detail",
System.Data.OleDb.OleDbType.VarWChar, 0, "Detail"))
Me.insTask.Parameters.Add(New System.Data.OleDb.OleDbParameter("Subject",
System.Data.OleDb.OleDbType.VarWChar, 150, "Subject"))
Me.insTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("TimeCompleted",
System.Data.OleDb.OleDbType.DBDate, 0, "TimeCompleted"))
Me.insTask.Parameters.Add(New System.Data.OleDb.OleDbParameter("TimeEnded",
System.Data.OleDb.OleDbType.DBDate, 0, "TimeEnded"))
Me.insTask.Parameters.Add(New System.Data.OleDb.OleDbParameter("TimeRemind",
System.Data.OleDb.OleDbType.DBDate, 0, "TimeRemind"))
Me.insTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("TimeStarted",
System.Data.OleDb.OleDbType.DBDate, 0, "TimeStarted"))
Me.insTask.Parameters.Add(New System.Data.OleDb.OleDbParameter("User",
System.Data.OleDb.OleDbType.VarWChar, 50, "User"))
'
'updTask
'
Me.updTask.CommandText = "UPDATE tblTasks SET Activity = ?, ChangeStamp = ?,
ClientID = ?, DateCompleted = " & _
"?, DateEnded = ?, DateStarted = ?, Detail = ?, Subject = ?, TimeCompleted =
?, T" & _
"imeEnded = ?, TimeRemind = ?, TimeStarted = ?, [User] = ? WHERE (ID = ?)
AND (Ac" & _
"tivity = ? OR ? IS NULL AND Activity IS NULL) AND (ChangeStamp = ?) AND
(ClientI" & _
"D = ? OR ? IS NULL AND ClientID IS NULL) AND (DateCompleted = ? OR ? IS
NULL AND" & _
" DateCompleted IS NULL) AND (DateEnded = ? OR ? IS NULL AND DateEnded IS
NULL) A" & _
"ND (DateStarted = ? OR ? IS NULL AND DateStarted IS NULL) AND (Subject = ?
OR ? " & _
"IS NULL AND Subject IS NULL) AND (TimeCompleted = ? OR ? IS NULL AND
TimeComplet" & _
"ed IS NULL) AND (TimeEnded = ? OR ? IS NULL AND TimeEnded IS NULL) AND
(TimeRemi" & _
"nd = ? OR ? IS NULL AND TimeRemind IS NULL) AND (TimeStarted = ? OR ? IS
NULL AN" & _
"D TimeStarted IS NULL) AND ([User] = ? OR ? IS NULL AND [User] IS NULL)"
Me.updTask.Connection = dbConContacts
Me.updTask.Parameters.Add(New System.Data.OleDb.OleDbParameter("Activity",
System.Data.OleDb.OleDbType.VarWChar, 25, "Activity"))
Me.updTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("ChangeStamp",
System.Data.OleDb.OleDbType.DBDate, 0, "ChangeStamp"))
Me.updTask.Parameters.Add(New System.Data.OleDb.OleDbParameter("ClientID",
System.Data.OleDb.OleDbType.Integer, 0, "ClientID"))
Me.updTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("DateCompleted",
System.Data.OleDb.OleDbType.DBDate, 0, "DateCompleted"))
Me.updTask.Parameters.Add(New System.Data.OleDb.OleDbParameter("DateEnded",
System.Data.OleDb.OleDbType.DBDate, 0, "DateEnded"))
Me.updTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("DateStarted",
System.Data.OleDb.OleDbType.DBDate, 0, "DateStarted"))
Me.updTask.Parameters.Add(New System.Data.OleDb.OleDbParameter("Detail",
System.Data.OleDb.OleDbType.VarWChar, 0, "Detail"))
Me.updTask.Parameters.Add(New System.Data.OleDb.OleDbParameter("Subject",
System.Data.OleDb.OleDbType.VarWChar, 150, "Subject"))
Me.updTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("TimeCompleted",
System.Data.OleDb.OleDbType.DBDate, 0, "TimeCompleted"))
Me.updTask.Parameters.Add(New System.Data.OleDb.OleDbParameter("TimeEnded",
System.Data.OleDb.OleDbType.DBDate, 0, "TimeEnded"))
Me.updTask.Parameters.Add(New System.Data.OleDb.OleDbParameter("TimeRemind",
System.Data.OleDb.OleDbType.DBDate, 0, "TimeRemind"))
Me.updTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("TimeStarted",
System.Data.OleDb.OleDbType.DBDate, 0, "TimeStarted"))
Me.updTask.Parameters.Add(New System.Data.OleDb.OleDbParameter("User",
System.Data.OleDb.OleDbType.VarWChar, 50, "User"))
Me.updTask.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.updTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Activity",
System.Data.OleDb.OleDbType.VarWChar, 25,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"Activity", System.Data.DataRowVersion.Original, Nothing))
Me.updTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Activity1",
System.Data.OleDb.OleDbType.VarWChar, 25,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"Activity", System.Data.DataRowVersion.Original, Nothing))
Me.updTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_ChangeStamp",
System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input,
False, CType(0, Byte), CType(0, Byte), "ChangeStamp",
System.Data.DataRowVersion.Original, Nothing))
Me.updTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_ClientID",
System.Data.OleDb.OleDbType.Integer, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"ClientID", System.Data.DataRowVersion.Original, Nothing))
Me.updTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_ClientID1",
System.Data.OleDb.OleDbType.Integer, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"ClientID", System.Data.DataRowVersion.Original, Nothing))
Me.updTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_DateCompleted",
System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input,
False, CType(0, Byte), CType(0, Byte), "DateCompleted",
System.Data.DataRowVersion.Original, Nothing))
Me.updTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_DateCompleted1",
System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input,
False, CType(0, Byte), CType(0, Byte), "DateCompleted",
System.Data.DataRowVersion.Original, Nothing))
Me.updTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_DateEnded",
System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input,
False, CType(0, Byte), CType(0, Byte), "DateEnded",
System.Data.DataRowVersion.Original, Nothing))
Me.updTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_DateEnded1",
System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input,
False, CType(0, Byte), CType(0, Byte), "DateEnded",
System.Data.DataRowVersion.Original, Nothing))
Me.updTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_DateStarted",
System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input,
False, CType(0, Byte), CType(0, Byte), "DateStarted",
System.Data.DataRowVersion.Original, Nothing))
Me.updTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_DateStarted1",
System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input,
False, CType(0, Byte), CType(0, Byte), "DateStarted",
System.Data.DataRowVersion.Original, Nothing))
Me.updTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Subject",
System.Data.OleDb.OleDbType.VarWChar, 150,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"Subject", System.Data.DataRowVersion.Original, Nothing))
Me.updTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Subject1",
System.Data.OleDb.OleDbType.VarWChar, 150,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"Subject", System.Data.DataRowVersion.Original, Nothing))
Me.updTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_TimeCompleted",
System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input,
False, CType(0, Byte), CType(0, Byte), "TimeCompleted",
System.Data.DataRowVersion.Original, Nothing))
Me.updTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_TimeCompleted1",
System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input,
False, CType(0, Byte), CType(0, Byte), "TimeCompleted",
System.Data.DataRowVersion.Original, Nothing))
Me.updTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_TimeEnded",
System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input,
False, CType(0, Byte), CType(0, Byte), "TimeEnded",
System.Data.DataRowVersion.Original, Nothing))
Me.updTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_TimeEnded1",
System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input,
False, CType(0, Byte), CType(0, Byte), "TimeEnded",
System.Data.DataRowVersion.Original, Nothing))
Me.updTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_TimeRemind",
System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input,
False, CType(0, Byte), CType(0, Byte), "TimeRemind",
System.Data.DataRowVersion.Original, Nothing))
Me.updTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_TimeRemind1",
System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input,
False, CType(0, Byte), CType(0, Byte), "TimeRemind",
System.Data.DataRowVersion.Original, Nothing))
Me.updTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_TimeStarted",
System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input,
False, CType(0, Byte), CType(0, Byte), "TimeStarted",
System.Data.DataRowVersion.Original, Nothing))
Me.updTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_TimeStarted1",
System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input,
False, CType(0, Byte), CType(0, Byte), "TimeStarted",
System.Data.DataRowVersion.Original, Nothing))
Me.updTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_User",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"User", System.Data.DataRowVersion.Original, Nothing))
Me.updTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_User1",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"User", System.Data.DataRowVersion.Original, Nothing))
'
'delTask
'
Me.delTask.CommandText = "DELETE FROM tblTasks WHERE (ID = ?) AND (Activity
= ? OR ? IS NULL AND Activity I" & _
"S NULL) AND (ChangeStamp = ?) AND (ClientID = ? OR ? IS NULL AND ClientID
IS NUL" & _
"L) AND (DateCompleted = ? OR ? IS NULL AND DateCompleted IS NULL) AND
(DateEnded" & _
" = ? OR ? IS NULL AND DateEnded IS NULL) AND (DateStarted = ? OR ? IS NULL
AND D" & _
"ateStarted IS NULL) AND (Subject = ? OR ? IS NULL AND Subject IS NULL) AND
(Time" & _
"Completed = ? OR ? IS NULL AND TimeCompleted IS NULL) AND (TimeEnded = ? OR
? IS" & _
" NULL AND TimeEnded IS NULL) AND (TimeRemind = ? OR ? IS NULL AND
TimeRemind IS " & _
"NULL) AND (TimeStarted = ? OR ? IS NULL AND TimeStarted IS NULL) AND
([User] = ?" & _
" OR ? IS NULL AND [User] IS NULL)"
Me.delTask.Connection = dbConContacts
Me.delTask.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.delTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Activity",
System.Data.OleDb.OleDbType.VarWChar, 25,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"Activity", System.Data.DataRowVersion.Original, Nothing))
Me.delTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Activity1",
System.Data.OleDb.OleDbType.VarWChar, 25,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"Activity", System.Data.DataRowVersion.Original, Nothing))
Me.delTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_ChangeStamp",
System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input,
False, CType(0, Byte), CType(0, Byte), "ChangeStamp",
System.Data.DataRowVersion.Original, Nothing))
Me.delTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_ClientID",
System.Data.OleDb.OleDbType.Integer, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"ClientID", System.Data.DataRowVersion.Original, Nothing))
Me.delTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_ClientID1",
System.Data.OleDb.OleDbType.Integer, 0,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"ClientID", System.Data.DataRowVersion.Original, Nothing))
Me.delTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_DateCompleted",
System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input,
False, CType(0, Byte), CType(0, Byte), "DateCompleted",
System.Data.DataRowVersion.Original, Nothing))
Me.delTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_DateCompleted1",
System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input,
False, CType(0, Byte), CType(0, Byte), "DateCompleted",
System.Data.DataRowVersion.Original, Nothing))
Me.delTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_DateEnded",
System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input,
False, CType(0, Byte), CType(0, Byte), "DateEnded",
System.Data.DataRowVersion.Original, Nothing))
Me.delTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_DateEnded1",
System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input,
False, CType(0, Byte), CType(0, Byte), "DateEnded",
System.Data.DataRowVersion.Original, Nothing))
Me.delTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_DateStarted",
System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input,
False, CType(0, Byte), CType(0, Byte), "DateStarted",
System.Data.DataRowVersion.Original, Nothing))
Me.delTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_DateStarted1",
System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input,
False, CType(0, Byte), CType(0, Byte), "DateStarted",
System.Data.DataRowVersion.Original, Nothing))
Me.delTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Subject",
System.Data.OleDb.OleDbType.VarWChar, 150,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"Subject", System.Data.DataRowVersion.Original, Nothing))
Me.delTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_Subject1",
System.Data.OleDb.OleDbType.VarWChar, 150,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"Subject", System.Data.DataRowVersion.Original, Nothing))
Me.delTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_TimeCompleted",
System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input,
False, CType(0, Byte), CType(0, Byte), "TimeCompleted",
System.Data.DataRowVersion.Original, Nothing))
Me.delTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_TimeCompleted1",
System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input,
False, CType(0, Byte), CType(0, Byte), "TimeCompleted",
System.Data.DataRowVersion.Original, Nothing))
Me.delTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_TimeEnded",
System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input,
False, CType(0, Byte), CType(0, Byte), "TimeEnded",
System.Data.DataRowVersion.Original, Nothing))
Me.delTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_TimeEnded1",
System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input,
False, CType(0, Byte), CType(0, Byte), "TimeEnded",
System.Data.DataRowVersion.Original, Nothing))
Me.delTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_TimeRemind",
System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input,
False, CType(0, Byte), CType(0, Byte), "TimeRemind",
System.Data.DataRowVersion.Original, Nothing))
Me.delTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_TimeRemind1",
System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input,
False, CType(0, Byte), CType(0, Byte), "TimeRemind",
System.Data.DataRowVersion.Original, Nothing))
Me.delTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_TimeStarted",
System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input,
False, CType(0, Byte), CType(0, Byte), "TimeStarted",
System.Data.DataRowVersion.Original, Nothing))
Me.delTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_TimeStarted1",
System.Data.OleDb.OleDbType.DBDate, 0, System.Data.ParameterDirection.Input,
False, CType(0, Byte), CType(0, Byte), "TimeStarted",
System.Data.DataRowVersion.Original, Nothing))
Me.delTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_User",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"User", System.Data.DataRowVersion.Original, Nothing))
Me.delTask.Parameters.Add(New
System.Data.OleDb.OleDbParameter("Original_User1",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, False, CType(0, Byte), CType(0, Byte),
"User", System.Data.DataRowVersion.Original, Nothing))
'
'selTask
'
Me.selTask.CommandText = "SELECT Activity, ChangeStamp, ClientID,
DateCompleted, DateEnded, DateStarted, De" & _
"tail, ID, Subject, TimeCompleted, TimeEnded, TimeRemind, TimeStarted,
[User] FRO" & _
"M tblTasks"
Me.selTask.Connection = dbConContacts