DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2006
    Posts
    2

    try in try vb.net error

    Hello,

    I'm new to vb.net.
    I use a try in a try catch but i get an error when i run my programme.
    Is there a way to solve this problem?

    Code:
    Private Sub NavigateRecords()
            Try
                txtNaam.Text = ds.Tables("DRmuziek").Rows(inc).Item(1) + ""
                txtArtiest.Text = ds.Tables("DRmuziek").Rows(inc).Item(2) + ""
                txtAlbum.Text = ds.Tables("DRmuziek").Rows(inc).Item(3) + ""
    
            Catch ex As Exception
    
                Try
                    inc = inc + 1
                    NavigateRecords()
                    inc = inc - 1
    
                Catch ex As Exception
    
                    txtNaam.Text = ""
                    txtArtiest.Text = ""
                    txtAlbum.Text = ""
    
                End Try
            End Try  
    
        End Sub
    Thnax in advance
    midnight

  2. #2
    Join Date
    Dec 2004
    Posts
    717
    Code:
    Private Sub NavigateRecords()
            Try
                txtNaam.Text = ds.Tables("DRmuziek").Rows(inc).Item(1) + ""
                txtArtiest.Text = ds.Tables("DRmuziek").Rows(inc).Item(2) + ""
                txtAlbum.Text = ds.Tables("DRmuziek").Rows(inc).Item(3) + ""
    
            Catch ex As Exception
    
                Try
                    inc = inc + 1
                    NavigateRecords()
                    inc = inc - 1
    
                Catch ex As Exception
    
                    txtNaam.Text = ""
                    txtArtiest.Text = ""
                    txtAlbum.Text = ""
    
                End Try
            End Try  
    
        End Sub
    Try changing the variable name of exception in Catch block..
    The same variables can't be used in same modules..
    Best Regards,
    Michael Sync
    http://michaelsync.net

    The more you share,The more you get

  3. #3
    Join Date
    Jul 2006
    Posts
    2
    Thanx

    my problem is solved.
    I changed the second ex to ex2

Similar Threads

  1. Error Opening Excel File in VB.NET
    By lucbrunet in forum .NET
    Replies: 2
    Last Post: 06-01-2006, 04:26 PM
  2. Error handling in VB.net
    By Sachin in forum .NET
    Replies: 2
    Last Post: 09-18-2001, 10:47 AM
  3. Error Building VB.NET app
    By Al Hotchkiss in forum .NET
    Replies: 3
    Last Post: 05-02-2001, 09:04 PM
  4. Winsock32, Connect fails to connect to a peer
    By Chris.G in forum VB Classic
    Replies: 4
    Last Post: 11-13-2000, 03:16 PM
  5. Sample Sites.
    By Murray Foxcroft in forum Web
    Replies: 5
    Last Post: 11-02-2000, 02:42 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links