Inserting a row into a dataset using tableadapter.insert

                    LastticketNo += 1
                    If Me.OutClass.Text = "Economy" Then
                        classtype = "Y"
                    Else : classtype = "C"
                    End If
                    ticketingTableAdapter.Insert(PNRNO, Integer.Parse(LastticketNo), Me.TitleCombo1.SelectedItem,     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,
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Carl TawnSystems and Integration DeveloperCommented:
Put a breakpoint in your Catch block and see what the actual exception is.
aborg85Author Commented:
Thanks for your response.

Can you suggest me some code to do the breakpoint pls.

Carl TawnSystems and Integration DeveloperCommented:
Well, to start just add the following line into your catch block:


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
aborg85Author Commented:
Thanks Carl_tawn,

that simple little line of code, helped me find my prob...

Thanks again
Until next time.... which wont be far away
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.