TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Lekker Ou
NA
5
0
Problem with Try/Catch/Finally
Jul 25 2005 1:35 PM
I;m a little new to C# and I've got the following problem. Any help will be really appreciated.
I'm reading a csv file and insering the data into a MySQL Database. I am not to concerned about
records that dont get added to the DB. Unfortunatly when there is an error on the insert due to
problems in the csv file my loop stops working.
Flow is as follows
try
{
read loop
{
set up SQL string and do insert
}
catch(ODBCexception)
{
and in here I would like to go and read the next record in the read loop and continue processing.
}
I've tried putting a goto in the catch to a label inside the read loop but i get an error about the
goto not referencing a a label in its scope. So I'm a little bit stuck at the moment.
I'm kinda looking for something like VB6's "On error resume next".
Thanks in advance
Reply
Answers (
2
)
Difference Console.WriteLine and Response.Write
How to create the menuitem inside the child form!