Application Slow Is DB Access/text File Code Ok?
Jan 26, 2012
I noticed that my application is running a bit slow. This is a Windows Service built using VB2010 with SQL Server as a back end. Its main function is to poll a folder looking for a text file. If found it reads the text file and imports the data into SQL Server.
While the slowness could be caused by a number of reasons, I am looking at my code to determine if it could be more efficient. Below I've pasted snippets of code where I initialize the DB connection and execute SQL statements. I've also included a snippet that illustrates how I am processing the text file.
I'd appreciate if the group could have a look at these and let me know if the method that I am using is the most efficient possible. At this time I am also focusing on other probable issues, but I can't rule out the possibility that the code that is in place might be a contributing factor.
[Code]...
View 4 Replies
ADVERTISEMENT
Apr 4, 2011
Is there a way to search fast in text file? i have a 5mb text file and it is slow to search ..Im using Vs2008 (VB) and MC3100 WinCE 6 platform
Code
Private Sub DataHandler()
[code].....
View 8 Replies
Sep 3, 2011
Im using VB2010 professional edition and Ms Access 2007 DB. Main form contains a button which accesses database, fetch results in textboxes and update database. But sometimes it takes almost 40seconds to fetch and sometimes it fetches immediately. Couldn't understand any pattern for this. The table in the database contains 8000records and Main form has 3000 lines of code.
View 2 Replies
Jun 5, 2011
I've got a vb.net 2005 form that calls a stored proc to load a combobox with eligible sales reps. There are approximately 40k sales reps available...I know that's a lot, but that's what I'm dealing with. I'm trying to figure out why it's taking this form 15 seconds to load.
Here's my code:
Want to load this in the most efficient way possible given the HUGE amount of data that my client is wanting to see.
Can you help me? :confused:
View 1 Replies
May 9, 2011
My stats:OS: XP Professional (2002) SP2Pentium 4 CPU, 3.2 Ghz, 2.98 G RAMApp: VS 2008 Pro. v 9.0.21022.8 RTM
View 3 Replies
Apr 3, 2009
I have an exe of an application.I want to automate the process of inserting start time into the text box of the application,I do not know the value of the textbox as I do not have the source code of the application.
View 2 Replies
Sep 21, 2010
I have an application half built which accesses a Access (2003)Database File. From within the application I am able to change the data in the Access File using a Data Grid. The changes to the Data File are saved and can be recalled, changed or otherwisemanipulated however, when I add too or change any of the applicationcode the Access file reverts back to it's original state losing any data or changes that has been made.
View 3 Replies
Dec 26, 2011
I have a .NET application (VB.NET) that runs against a MS Access database. Every data request connects to the access database, runs and returns the query and closes the connection back again. I placed the database on a windows xp 32-bit machine. I have two clients on which I installed the .NET application. Both clients are running windows 7 professional 32-bit. Now I have a performance problem with this.
When I use the first client it runs fine. All data is shown very fast. When I than use the second client, it takes some 10 seconds to connect to the database, fetch the data and close the database connection. When i ask for other data on that second client, it all runs fine, until I request data from the first client than back again. Than it takes again 10 seconds on the first client before my data is fetched.
View 2 Replies
May 2, 2012
I save Data in MS Access Is too slow. I click Save button [Saved Msgbox appear] then I see the table there is no changes, after 5-6 second it take effects. The code is....
[Code]...
View 7 Replies
Oct 9, 2009
I have to generate about 800 excel files from an access database.
For the first 10-15 of them it's working nice, a few seconds/excel file but it's constantly taking longer, at the 150th excel file it's taking 10 minutes.
Here is my code:
It's doing this for each nrliste in the access table (about 800 of them)
Dim lista = From ls In Liste _
Where ls!Concatenare = nrliste(i) _
Select ls
[Code].....
View 5 Replies
Apr 6, 2009
I have looked all over for a solution to this problem and have tried a bunch of different things, but nothing seems to work.I have a sub procedure that does the following:
1) adds two columns to a data table (table1)
2) fills a dataset with several tables in order to make calculations (this determines the data that will be stored in the two new columns of table1)
3) updates ONLY table1, and ONLY the two columns that have just been added (these columns are thus empty for every row before the update begins)
As it is now, the da.Update takes about 3 hours to populate the entire table (it updates about 300 records per MINUTE if I'm lucky). There are approximately 40000 records in table1 for this test subset, but there will eventually be up to 1.5-2 million (in other words, this is a small table currently). I have tried using executenonquery() along with a sql UPDATE command instead of da.Update, as well as many other things, but none of them has improved performance at all. I've also tested it on two PCs, one running Vista and one XP, and there were no differences. I'm using Access 2003. I know Access is not ideal, but for now it is the only option.
I know that the root of this is the line of code with the da.Update, because the giant loop before it that I previously thought was causing the slowdown executes in 30 seconds, leaving only the update before the subroutine is complete. I don't know how exactly the da.Update works, but I've suspected that maybe it has something to do with that? Code is below:
[code]...
View 7 Replies
Apr 2, 2009
I have built an application using VB 2005 express edition with backend Ms Access 2000. In main form(which is loaded on startup), I am having 9 datagridviews, each bound with databindingsources. I am refreshing this data every 15 seconds by refilling the table adapters and updating the datagridviews.Now, this access database is shared in the network and is accessed by about 5-6 users concurrently. There are other forms which are used to edit the data.My problem is poor performance of the application. Its very slow in opening up forms, not responding sometimes and using the network resources fully.
View 5 Replies
Jul 1, 2009
I've tried using the VS 2010 beta to edit some real projects, and it is next to unusable due to performance issues. The cpu is more or less constantly at 100%, and most often the code editor uses around 10 seconds to respond to any text input. If I introduce a couple of compile errors things get even worse. Are there some drastical performance improvements that are planned in the VB editor before release, or are there special things that might trigger this?
View 22 Replies
Oct 19, 2011
I am using DataSet.ReadXml() to create a DataSet from the following XML file, so that I can quickly query it using Linq.[URL]..I then use the following object to create a DataTable which can be used as a dictionary, with a ConvertToFriendlyFormat function that takes an Emulator_Id and and a string that corresponds to a DicEntry node's StoredFormat attributed, and return the same node's FriendlyFormat attribute.
This does work BUT it is extremely slow (~11 seconds to call it ~220 times). I have been unable to figure out how create the DataSet when the object is initialised and just query the simple DataTable in the ConvertToFriendlyFormat call. I guess this is what is slowing it down?
[Code]...
View 4 Replies
Jul 22, 2009
I have designed an application just like it is an Excel table. By changing each textbox the application runs a huge amount of vb code and it takes time.
E.g. you want to enter a three digits number it takes from two to four and sometimes more seconds for ech digit to enter. That`s really embarrassing.
View 11 Replies
Jan 23, 2009
I have a problem with a application, when i start the program the speed is ok.after 1 hour of use the prohram go very slow.
View 7 Replies
Aug 24, 2009
I have been developing an application using Visual Studio/VB and access 07 for my db. On the system I am developing my app. the db is local and the speed of the application is very good when I debug it. As I publish my application the db goes on a network server and the application is installed/used by 5-6 pc. The speed of the program drops alot as time passes and as is used, speed goes even more down. My problem is that I do not know what is making this change. Is it the server fault, the other pc, the many users, the lack of garbage collector ( other than the one vb does alone ), the existense of the db on the server? Based on the information I give does anyone has a tip on how to increase speed. I dont know how to begun to start fixing it as I do not know where the problem resides. One example of poor performance is the search I do on the program. For the first search I do they are ok then the more I make the slower they get.
View 16 Replies
Nov 3, 2009
I want to create a text file or see if a text file exists when application starts. The problem I was having was after creating the text file, I tried to write to text file and got an error saying that another process was using it.
Dim test As String = My.Computer.FileSystem.SpecialDirectories.MyDocuments & " est1.txt"
If System.IO.File.Exists(test) Then
MsgBox("File Loaded")
Else
[code]....
I looked up topics on filestream, but am unsure if this is how to use it. Is my code ok? Is there another way to create a text file?
View 2 Replies
Mar 24, 2012
How do access a code to do something for only the last clicked text box and turn it into an If...ElseIf...End If statement?
View 3 Replies
Jan 10, 2012
The following code loads a large 1 bit depth bitmap (10800x7226) on a PictureBox docked and with auto scroll bars.
After loading the bitmap I can drag the scrollbars, and it's very responsive.
After clicking the PictureBox and executing the Bitmap.Clone, dragging the scrollbars becomes very sluggish.[code]...
View 7 Replies
Sep 13, 2010
I have a Vb.Net 2010 solution with two projects and a total of around 500 forms. Until last week compilation of these projects occured in about 30 seconds. Starting a few days ago (without any noticiable change) compilation now takes around 15 minutes! The «culprit» seems to be ResGen.exe: looking at Task Manager this program is using 25% of CPU time while devenv.exe stays idle - no other programs are active. Target CPU is x86 and target Framework is 3.5. The development machine runs Windows 7 Professional and is updated with all regular updates and SPs.
View 2 Replies
Jun 11, 2011
I've read around that playing WAV files from resources using My.Computer.Audio.Play causes horrid distortion when playing the sound, and I've experienced this myself. I cannot,however, use WaitToComplete, because the sounds are associated with a timer that cannot stop for anything, as it is an official competition timer.Also, I'm having an issue with the application being extremely slow when loading data from an Excel file. Essentially, the program has a grid of labels with transparent backgrounds (which seems to make the speed issue worse). The program uses the MS Office library to pull data from a spreadsheet, then output cells to one label at a time. This unfortunately, causes the application to nearly freeze, which also stops the timer, which as I said above, cannot happen
View 8 Replies
Oct 14, 2010
I am moving a lot of data to MS Excel from my application. I use a conditional statement to choose which Excel page the data is transferred into. Then a For Next statement to divide the data into various areas on the Excel sheet.The first sheet will always work correctly, but on the next conditional statement to chose the next Excel sheet no data transfers when running the program. If I step the program by hand all data all code works fine. I believe I need to pause between the conditional statements but I have been unable to get one to work.In the following code I have been trying to get a pause between to conditional statement to no avail.
[Code]...
View 7 Replies
Jun 12, 2011
I'm using Visual Basic Express 2008 to create an interface with a order database in MS Access 2007 (.accdb file). Everything is fully functional except updating the "Inventory" table is very slow. Updating around 2200 items takes almost 2 minutes and the window will appear as "not responding" for the duration if you click away and come back. Here is the process:1. Tab-delimited text file is picked by user, which includes all inventory items (not just new ones)2. Each line from text is parsed and read into variables (tempSKU, tempItemTitle, etc.)3. Old items are updated and new ones are added. -> This is the bottleneck
I used to have a series of IF statements to check which elements were changed and report them, but that was about 2x as slow. The new code is a little faster but doesn't provide the feedback I liked (update part is commented around):
Private Sub btnImportInv_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) andles btnImportInv.Click
Dim strName As String
[code]....
View 3 Replies
Jan 7, 2009
I am writing a program to calculate Pi to several hundred billion decimal places and this will require lots of GB of memory. I wrote a test program in VB2008 that saved the first 16 digits of Pi (without the decimal point) to both a text file and a random access file, just to be sure it was outputting the numbers properly. For reference the first 16 digits of Pi are:
View 8 Replies
Apr 30, 2009
I have written a quick 'algorithm' that automatically formats curly brace code in the correct way:[code]It works quite simple, it loops through all the lines and keeps track of the brace count using a counter. The counter will be incremented by 1 if it finds an opening brace, and decremented by 1 if it finds a closing brace.Then, each line is trimmed, and a total of "n" tabs is inserted before the text, where "n" is the brace count as explained above.[code]So my question basically is, how can I avoid having to do the same thing (exchanging lines) twice? I have noticed that the actual exchanging of lines is very slow, so having to do it twice for each closing brace line is simply a very bad design..
View 6 Replies
Jul 5, 2010
I'm asking this question here, in this forum, as I couldn't find MSDN Managed forum for Crystal Reports. And the previously asked questions are unanswered. I've developed an application using VB.NET and Crystal Reports in VS2008. The report generated gets printed correctly on modern laser or inkjet printers. However, the entire formatting gets affected when I print these reports on dot matrix printer. Apart from that. the print speed is very slow. I tried exporting the report to PDF, XLS, DOC and other formats - but no solution. There was Export to Text function, which is not working in Crystal Reports now.
[Code]...
View 1 Replies
Jun 29, 2009
I found some code online for a vb paint application and I modified it for my use, which is a signature application. It uses a tablet connected to the pc to write the signature on the screen and then save it as a bitmap for later retrieval.The only issue i am having right now is that if you write on the tablet too fast, the signature gets broken up alot, any way to quicken the paint process in the code so that I can get a smoother signature?
Here is my code:
Imports System
Imports System.Collections
Imports System.Data
Imports System.IO
Imports System.Xml.Serialization
[Code] .....
View 1 Replies
Oct 7, 2011
I'm trying to enter code into a button to save a text file from a text box.The text box is called txtEditor, I have created an open file button using the openFileDialog1 and have been successful with this I just can't get the saveFileDialog1 to work.
View 3 Replies
Aug 23, 2010
I have an application that consists of about 4 screens. Screens can be changed by clicking on buttons or via menu item. I use about 16 to 17 tables in all for all 4 screens. I've publised the application and it works fine except that it takes about 1 1/2 to 2 minutes to launch the application using the setup file that I save onto my PC. If I get lucky, a little over a minute is already fast for me. What can I do to help speed up the launch time?
View 12 Replies