Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Trouble with try catch
Message
De
26/12/2005 09:48:54
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
26/12/2005 08:55:11
Information générale
Forum:
ASP.NET
Catégorie:
ADO.NET
Versions des environnements
Environment:
VB.NET 1.1
OS:
Windows Server 2003
Network:
Windows 2000 Server
Database:
Visual FoxPro
Divers
Thread ID:
01080810
Message ID:
01080817
Vues:
9
>hi i've this code:
>
>Try
> oleconnect.Open()
> Catch ex As OleDbException
> For i As Integer = 0 To i < ex.Errors.Count - 1
> MessageBox.Show("Indice " & ex.Message & ex.Errors(i).ToString)
> Next
> End Try
>
>but if i've an error not entry to cath .

Daniel,
The error you're having might not be of type OleDbException. Your code has catch for OleDbException only. ie:
Try
            oleconnect.Open()
        Catch ex As OleDbException
            For i As Integer = 0 To i < ex.Errors.Count - 1
                MessageBox.Show("Indice " & ex.Message & ex.Errors(i).ToString)
            Next
catch otherex as Exception
' code
        End Try
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform