|
-
January 26th, 2005, 07:04 AM
#1
What if oleDb throw an Exception
i can't connect to my database the OLEDB throw the following error
An unhandled exception of type 'System.Data.OleDb.OleDbException' occurred in system.data.dll
How can you handel it
thanks
-
January 28th, 2005, 07:40 AM
#2
Re: What if oleDb throw an Exception
to catch the exception you should use the try catch statements...
try{
My_OleDBConnection.Open();
}
catch(OleDbException m_Ex)
{
Messagebox.Show(m_Ex.Message);
}
Finally
{
//free resource here...
}
If you think you CAN, you can, If you think you CAN'T, you are probably right.
Have some nice Idea to share? Write an Article Online or Email to us and You may WIN a Technical Book from CG.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|