M
Matthew Hood
When updating an access table using the ADD COLUMN sql statement, my routine
may encounter an OleDbException stating that the field already exists. How
can I test for this error to allow the continuation while still catching
other OleDbExceptions?
The only way I can think of is to test for a substring on the message.
ie:
Try
appendcolumcommand
Catch ex As OleDbConnection
**** IF ex is because field already exists ****
Happily continue on
**** ELSE ex is another type of OleDbException ****
NotifyUser
Catch ex As Exception
NotifyUser
End Try
TIA,
-Matt
may encounter an OleDbException stating that the field already exists. How
can I test for this error to allow the continuation while still catching
other OleDbExceptions?
The only way I can think of is to test for a substring on the message.
ie:
Try
appendcolumcommand
Catch ex As OleDbConnection
**** IF ex is because field already exists ****
Happily continue on
**** ELSE ex is another type of OleDbException ****
NotifyUser
Catch ex As Exception
NotifyUser
End Try
TIA,
-Matt