-
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
-
Re: Loop Error
Unless you are closing the connection somewhere in that code, it only needs to be opened once.
-
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.
-
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.
-
Re: Loop Error
the connection wouldn't close there ^^
im sure.
-
Re: Loop Error
nobody a Idea?
c'mon please help at it.