Hi Armin,
Thank you for your response.
I do have a try catch block in place and the exception occurs when
my insert statement violates a priimary key. This is how the catch
block looks like.
===========
Catch ex As Exception
If ex.InnerException Is Nothing Then
Log("*** Schedule.CreateShifts() Error occured. - " &
ex.Message)
Else
Log("*** Schedule.CreateShifts() Error occured. - " &
ex.InnerException.Message)
End If
==========
and the error message i am receiving is:
"ERROR [23000] [MySQL][ODBC 3.51 Driver][mysqld-5.0.21-community-
nt]Duplicate entry '2007-09-17 00:00:00-9-1' for key 1"
My question is, how can i single out this particular exception in my
catch block? As i will be performing a different set of activity for
primary key violations and for any other exceptions, i will just be
logging them in a log file.