473,804 Members | 4,005 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.FindReco rd"
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.Fin d("skitsa", w)

If found -1 Then

My.Forms.skitso .SKITSABind.Pos ition() = found

Else

p = Val(w)

Do

found = My.Forms.skitso .SKITSABind.Fin d("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.Pos ition() = found

End If

Ånd If
Feb 12 '07 #1
2 2259
On Feb 12, 12:02 pm, "giannis" <zzzinob...@fre email.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.FindReco rd"
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.Fin d("skitsa", w)

If found -1 Then

My.Forms.skitso .SKITSABind.Pos ition() = found

Else

p = Val(w)

Do

found = My.Forms.skitso .SKITSABind.Fin d("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.Pos ition() = 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
3146
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 the variable to the value in the next record in the recordset and do a count. Then overwrite the value in the variables and do the same for the next record and so. But this runs extremly slow. 5000 records takes about 10 minutes in IE6 and I...
11
17578
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 to load making any kind linkage with my Access data virtually useless. I have the MySQL driver setup in as a USER DSN. The MySQL data is sitting out on a server and the Access database is running locally. The network connection is very...
5
2735
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 the appointment collection to populate the calendar control. The performance getting the XML data is fine, but loading the data into the collection is slow. My question/problem is should I be using the collection, a dataset, or something else to...
2
8276
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 Windows Form Designer support
1
2591
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 Primary loop the problem? tia, dk
7
5271
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 determine why this is happening? I couldn't figure out how to run EXPLAIN ANALYZE from within the function. The queries aren't very complicated. Here is an example query and plan. About 240K rows in x_rbl_ips, 7.5M rows in filter_ips. explain...
5
4187
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 . Until inside each of them.
20
2037
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 slow both in release and debug mode. The main problem is the for-loop shown in the code bellow. Without the for-loop I can get somewhere around 10-20 updates/second. With the for-loop I get an update every 2-3 seconds. The strange thing is that when...
7
2427
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 I-combinator: a do-nothing function. The best I know of is: (lambda x: x), but it is not ideal. Consider a much-simplified example of such an iteration where sometimes you need to transform an item by some function, but most of the time you don't:
2
2503
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 script timeouts and I cannot figure it out. I have moved some test code to other sites on the server and still have these long delays. I have tried dropping the tables, then the database entirely and restoring and still slow. I run the same code on...
0
9579
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10330
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10319
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10076
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6851
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5520
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4297
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3816
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.