aborg85
asked on
Inserting a row into a dataset using tableadapter.insert
Try
LastticketNo += 1
MessageBox.Show(Lastticket No)
If Me.OutClass.Text = "Economy" Then
classtype = "Y"
Else : classtype = "C"
End If
ticketingTableAdapter.Inse rt(PNRNO, Integer.Parse(LastticketNo ), Me.TitleCombo1.SelectedIte m, Me.FirstNameBox1.Text, Me.SurnameBox1.Text _
, Me.PassportBox1.Text, Me.OutFlightNo.Text, (CType(RSdepartDate.Text, Date)), True, classtype, "Tony", Date.Now)
MessageBox.Show("ticket insert 1 ok")
Catch ex As Exception
MessageBox.Show("Ticket 1 failed")
End Try
this piece of code doesnt work for me.. no idea what is wrong with it.... NEED HELP badly guys.. it keeps giveing ticket 1 failed
is the date diclared well ((CType(RSdepartDate.Text, Date)),) not sure about that...
Basicly this is an airline reservation system,
LastticketNo += 1
MessageBox.Show(Lastticket
If Me.OutClass.Text = "Economy" Then
classtype = "Y"
Else : classtype = "C"
End If
ticketingTableAdapter.Inse
, Me.PassportBox1.Text, Me.OutFlightNo.Text, (CType(RSdepartDate.Text, Date)), True, classtype, "Tony", Date.Now)
MessageBox.Show("ticket insert 1 ok")
Catch ex As Exception
MessageBox.Show("Ticket 1 failed")
End Try
this piece of code doesnt work for me.. no idea what is wrong with it.... NEED HELP badly guys.. it keeps giveing ticket 1 failed
is the date diclared well ((CType(RSdepartDate.Text,
Basicly this is an airline reservation system,
Put a breakpoint in your Catch block and see what the actual exception is.
ASKER
Thanks for your response.
Can you suggest me some code to do the breakpoint pls.
Thanks
Can you suggest me some code to do the breakpoint pls.
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks Carl_tawn,
that simple little line of code, helped me find my prob...
Thanks again
Until next time.... which wont be far away
that simple little line of code, helped me find my prob...
Thanks again
Until next time.... which wont be far away