|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
OleDbAdapter Error when program Start ? msgbox show
Hi,
I have a little problem in my program. I use OledbAdapter and Dataset etc... My problem is that when the program start the adapters try to connect to the SQL Database to populate de dataset etc... But my database is on a Sql Server and it's not everyone that have access to it. The Administrator have to give him the rights before he can access any tables. So if the user doesn't have the rights then a Pop-Up from Vb.Net tell the user that an error occured while connecting the OleDbAdapters. Instead of that message, I would like to put a message box that will tell my user that he doesn't have the right to connect to the SQL Server and to contact his network administrator. soo how does I do that ? I don't have access to the code of the Adapter that connect the dataset to the database. I would like to do a sort of Try Catch but when and where ? Anybody ever got a problem like that ? How you solve it ?
__________________
|
|
#2
|
|||
|
|||
![]() |
|
#3
|
|||
|
|||
|
I have not been working on it for a while. But now I need to work on it, and I still don't know how I can solve that kinda little problem. It's damn stupid but users are stupid and I hate code 13, soo you try your best that it doesn't happens
![]() soo if anyone have any idea, your help will be appreciate. |
|
#4
|
|||
|
|||
|
Something like this:
OleDbConnection1.Open() Try 'your stuff here Catch ex As Exception 'error handling 'tidy up OleDbConnection1.Close() MsgBox(ex.ToString) End Try ![]() |
|
#5
|
|||
|
|||
|
Thank You Pain for your help but I don't think I can do that.
My problem occur before I can do any code. It's just itiliasize my form and then he create the object and when he create the oleadapters objects he bug there cause he don't have access. That's what it's look like. I will try to see what I can do. don't know how yet but were would be the fun if we don't need to do some research ![]() |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > .Net Development > OleDbAdapter Error when program Start ? msgbox show |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|