Hi
In my application i have a dataSet which has been created by the
designer. I have added the following query to one of the tables;
------------------------------------------------------------------------------------------------------------------------------------------------
INSERT INTO reservationsTbl
(OrderID, CustomerID, Time, PartySize, Date)
VALUES (@OrderID, @CustomerID,@Ti me,@PartySize,@ Date)
------------------------------------------------------------------------------------------------------------------------------------------------
I now have the following code to try and execute this query;
------------------------------------------------------------------------------------------------------------------------------------------------
Dim reservationsAda pter As New
dsTableAdapters .reservationsTb lTableAdapter
Try
reservationsAda pter.InsertRese rvation(10, ID,
TimeTxt.Text, PartySizeTxt.Te xt, DatePicker.Valu e)
Catch ex As Exception
MsgBox("Inserti ng new record failed. " + ex.Message)
End Try
------------------------------------------------------------------------------------------------------------------------------------------------
No error message is shown when the code is executed however the record
is not inserted. Can anyone help?
Thanks in advance!
In my application i have a dataSet which has been created by the
designer. I have added the following query to one of the tables;
------------------------------------------------------------------------------------------------------------------------------------------------
INSERT INTO reservationsTbl
(OrderID, CustomerID, Time, PartySize, Date)
VALUES (@OrderID, @CustomerID,@Ti me,@PartySize,@ Date)
------------------------------------------------------------------------------------------------------------------------------------------------
I now have the following code to try and execute this query;
------------------------------------------------------------------------------------------------------------------------------------------------
Dim reservationsAda pter As New
dsTableAdapters .reservationsTb lTableAdapter
Try
reservationsAda pter.InsertRese rvation(10, ID,
TimeTxt.Text, PartySizeTxt.Te xt, DatePicker.Valu e)
Catch ex As Exception
MsgBox("Inserti ng new record failed. " + ex.Message)
End Try
------------------------------------------------------------------------------------------------------------------------------------------------
No error message is shown when the code is executed however the record
is not inserted. Can anyone help?
Thanks in advance!
Comment