473,396 Members | 1,676 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

A very slow Loop

At the below code i search for a value of a field of a BindingSource
and when not found i search for the 40 earlier values inside a Loop.

At the Access VB i used the same Loop with the command "DoCmd.FindRecord"
and the rapidity was very much big.

Now at the VB this Loop be late very much (it is very slow). :(
Why this happens and how can i resolve this problem ?
Is there any other way to make this loop more fast ?
Dim found As Integer = My.Forms.skitso.SKITSABind.Find("skitsa", w)

If found -1 Then

My.Forms.skitso.SKITSABind.Position() = found

Else

p = Val(w)

Do

found = My.Forms.skitso.SKITSABind.Find("skitsa", Trim(Str(p)))

If found < 0 Then p = p - 1

If found -1 Or Val(w) - p 40 Or p < 15 Then Exit Do

Loop

If found -1 Then

My.Forms.skitso.SKITSABind.Position() = found

End If

Ånd If
Feb 12 '07 #1
2 2240
On Feb 12, 12:02 pm, "giannis" <zzzinob...@freemail.grwrote:
At the below code i search for a value of a field of a BindingSource
and when not found i search for the 40 earlier values inside a Loop.

At the Access VB i used the same Loop with the command "DoCmd.FindRecord"
and the rapidity was very much big.

Now at the VB this Loop be late very much (it is very slow). :(
Why this happens and how can i resolve this problem ?
Is there any other way to make this loop more fast ?

Dim found As Integer = My.Forms.skitso.SKITSABind.Find("skitsa", w)

If found -1 Then

My.Forms.skitso.SKITSABind.Position() = found

Else

p = Val(w)

Do

found = My.Forms.skitso.SKITSABind.Find("skitsa", Trim(Str(p)))

If found < 0 Then p = p - 1

If found -1 Or Val(w) - p 40 Or p < 15 Then Exit Do

Loop

If found -1 Then

My.Forms.skitso.SKITSABind.Position() = found

End If

Ånd If
What exactly is this supposed to accomplish?

Thanks,

Seth Rowe

Feb 12 '07 #2
sorry dog this dotnet crap is slower than Access is, for development
and execution time

Feb 12 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Shay | last post by:
essentially I am trying to do some counts based on some assumptions in the recordset. So I get the RS back, put the values into a variable, move to the next record in the RS and compare what is in...
11
by: DJJ | last post by:
I am using the MySQL ODBC 3.51 driver to link three relatively small MySQL tables to a Microsoft Access 2003 database. I am finding that the data from the MySQL tables takes a hell of a long time...
5
by: Kurt Bauer | last post by:
I have an ASP group calendar application which pulls calendar data from Exchange via webdav into an XML string. I then loop the XML nodes to populate a collection of appointments. Finally I use...
2
by: Robert Hooker | last post by:
Hi, I'm curious to know if I'm doing something wrong here, or if this is just mind-numbingly slow for a reason. In a simple WindowsFormsApplication: public Form1() { // Required for...
1
by: dk | last post by:
Any idea why the response time is slow when running a system tray app when viewing the properties form? There is one primary loop and a timer control which executes every 3minutes. Is having the...
7
by: Jim Crate | last post by:
I have a couple queries in a PL/PGSQL function which execute very slowly (around one minute each) which execute in .5 second when not executed from within the function. Is there any way to...
5
by: PH | last post by:
Hi guys; I got a single processor computer, running an application that launches 2 threads. Each of these threads listens for incoming connections in a specific port, so there is a Loop ....
20
by: hufaunder | last post by:
I have 16-bit data that I want to display. In order to display it I compress a certain range of the input data into 8 bit (I need control over this). All seems to work ok except that it is dead...
7
by: Deron Meranda | last post by:
This is an optimization problem, one that occurs deep inside a loop that gets executed thousands of times. I'm looking for something in Python which would act like an identity operator, or...
2
by: gnomee2 | last post by:
Hello Everyone, I have a strange problem that I cannot seem to solve. I have two server running Windows 2003 MSSQL on one IIS on the other. Out of the blue I have slow queries that cause asp...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.