Which Exception appears when insert duplicated data (primairy key in a database
-
Hello, Which Exception appears when inserting duplicated data (primairy key) in a database? In my application "System.Data.OleDb.OleDbException" appeared but that seems to general to me?? And how can i use the try, catch statement? Thanks
That looks about right, it's a database exception, and there are not exceptions defined for everything that can happen in the DB. The text of the exception will explain it
keninfo wrote:
And how can i use the try, catch statement?
If you really don't know how to use try/catch, you probably need to buy a book on VB and work through it. Or, at least try google.
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
-
That looks about right, it's a database exception, and there are not exceptions defined for everything that can happen in the DB. The text of the exception will explain it
keninfo wrote:
And how can i use the try, catch statement?
If you really don't know how to use try/catch, you probably need to buy a book on VB and work through it. Or, at least try google.
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
-
-
Well, I assume you knew what you've been told ( as it's the bare bones of what try/catch does ). What did you need to know ?
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )