|
-
Nov 20th, 2007, 02:32 PM
#1
Thread Starter
New Member
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
-
Nov 20th, 2007, 02:34 PM
#2
Re: Loop Error
Unless you are closing the connection somewhere in that code, it only needs to be opened once.
-
Nov 20th, 2007, 02:37 PM
#3
Thread Starter
New Member
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.
-
Nov 20th, 2007, 02:40 PM
#4
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.
-
Nov 20th, 2007, 02:41 PM
#5
Thread Starter
New Member
Re: Loop Error
the connection wouldn't close there ^^
im sure.
-
Nov 21st, 2007, 10:24 AM
#6
Thread Starter
New Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|