G
Guest
Hi
Im wanted to know if it is possible to find out if a row has already been inserted into a datatable
i.e i only want to push new data into my datatable if it has not alreay been previously inserted. for example.. the primary key does not already exist
This is my code for an onclick event of a button
InsRoomBooking = dsFullBooking.Tables("dtRoomBooking").NewRow(
InsRoomBooking("BookingNo") = "-1
InsRoomBooking("RoomID") = RoomI
InsRoomBooking("RoomDt") = dtpRoomDate.Tex
InsRoomBooking("Room_Name") = CBoxRoomNames.Tex
InsRoomBooking("Req_Session") = CBoxSession.Tex
InsRoomBooking("Req_Layout") = CBoxLayout.Tex
InsRoomBooking("No_Of_Guests") = txtNoOfGuests.Tex
My primary key for this table is: BookingNo, RoomID, RoomDt, Req_Sessio
I only want to perform the insert into my datatable if these values do not alreay exist in my datatable. How can i do this? Do i have to use an if statemnet before the insert
Can anybody help me
Im wanted to know if it is possible to find out if a row has already been inserted into a datatable
i.e i only want to push new data into my datatable if it has not alreay been previously inserted. for example.. the primary key does not already exist
This is my code for an onclick event of a button
InsRoomBooking = dsFullBooking.Tables("dtRoomBooking").NewRow(
InsRoomBooking("BookingNo") = "-1
InsRoomBooking("RoomID") = RoomI
InsRoomBooking("RoomDt") = dtpRoomDate.Tex
InsRoomBooking("Room_Name") = CBoxRoomNames.Tex
InsRoomBooking("Req_Session") = CBoxSession.Tex
InsRoomBooking("Req_Layout") = CBoxLayout.Tex
InsRoomBooking("No_Of_Guests") = txtNoOfGuests.Tex
My primary key for this table is: BookingNo, RoomID, RoomDt, Req_Sessio
I only want to perform the insert into my datatable if these values do not alreay exist in my datatable. How can i do this? Do i have to use an if statemnet before the insert
Can anybody help me