Results 1 to 6 of 6

Thread: Loop Error

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2007
    Posts
    10

    Loop Error

    Hello Community,

    i have got this problem:
    im starting a connection to a Database, that works all fine, but then do i have to put in it a Loop , because if i diddnt put it in, than do he only gets the First of the Database, and that is wrong.
    now do he only grabs the First one, but i need that he gets all of the Database.
    Some One a Idea?

    here the Code of the Loop.
    Code:
    Do While Not PrUpdater
        GetLinkId
        GetLinkUrl
        GetPreviousPR
        
    
        Chrlinkid = txt_linkid.Text
        Chrlinkurl = txt_linkurl.Text
        Chrpreviouspr = txt_previouspr.Text
        Chrnewpr = txt_newpr.Text
                 
    ListView1.ListItems.Add , , Chrlinkid
        With ListView1.ListItems(ListView1.ListItems.Count)
            .SubItems(1) = Chrlinkurl
            .SubItems(2) = Chrpreviouspr
            .SubItems(3) = Chrnewpr
            .SubItems(4) = Chrnewpr
            .EnsureVisible 'scroll
        End With
    
        GetLinkIdNext
        GetLinkUrlNext
        GetPreviousPRNext
        
        GoTo nextone
    Loop
    If MoveNext = True Then
    GoTo Endone
                Else
                    rs.MoveNext
                    
    Endone:
    End if
    Greet Undercover

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Loop Error

    Unless you are closing the connection somewhere in that code, it only needs to be opened once.

  3. #3

    Thread Starter
    New Member
    Join Date
    Nov 2007
    Posts
    10

    Re: Loop Error

    then tell me what is wrong so that i can fix it, or make a fixed code, thx btw for the answer.

  4. #4
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Loop Error

    If you have made a connection and are getting disconnected, then somewhere in your code, the connection is getting closed (unless your workstation is actually dropping the connection which I would doubt)

    My suggestion would be to put a break at the beginning of the routine and "walk" through the entire thing to see exactly what is happening.

  5. #5

    Thread Starter
    New Member
    Join Date
    Nov 2007
    Posts
    10

    Re: Loop Error

    the connection wouldn't close there ^^
    im sure.

  6. #6

    Thread Starter
    New Member
    Join Date
    Nov 2007
    Posts
    10

    Re: Loop Error

    nobody a Idea?

    c'mon please help at it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width