I upgraded from VB 2003 to VB 2005.
I have a 4000 record table in Access that I'm using oleDB to do a data
adapter fill to a Data Grid. In VB.2003 it takes 2-3 seconds to load the
data grid in vb 2005 it takes aroudn 20 seconds. IS there something that
could be causing this problem?
Aug 7 '06
11 1407
Stephen,
I don't know if the method with the datareader will help you. http://msdn2.microsoft.com/en-us/lib...able.load.aspx
I did not test that.
Cor
"Stephen Plotnick" <sp*******@grou pcbf.comschreef in bericht
news:X8******** *************** *******@giganew s.com...
Cor,
Thanks for the quick program and test. I'll need to go back to using
vb.NET for now until this can get resolved; what are the procedures for
finding out when this gets fixed?
Steve
"Cor Ligthert [MVP]" <no************ @planet.nlwrote in message
news:O5******** ******@TK2MSFTN GP06.phx.gbl...
>Stephen,
I don't know why it is,
I made this Test program \\\ 'Set in advance a reference to COM adox ext 2.x for dll and security
Public Class Main Public Shared Sub Main() 'cleanup old databases Dim catNewDB As New ADOX.Catalog Dim fi As New IO.FileInfo("c: \db1.mdb") If fi.Exists Then If MessageBox.Show ("Delete?", "Existing File db1.mdb", _ MessageBoxButto ns.YesNo) = DialogResult.Ye s Then fi.Delete() Else Exit Sub End If End If catNewDB.Create ("Provider=Micr osoft.Jet.OLEDB .4.0;" & "Data Source=C:\db1. mdb")
Dim conn As New OleDb.OleDbCon nection("Provid er=Microsoft.Je t.OLEDB.4.0;" & _ " Data Source=C:\db1.m db;User Id=admin;Passwo rd=;") Dim cmd As New OleDb.OleDbComm and("CREATE TABLE tester ( " & _ "Id int ," & _ "Whatever NVarchar(50)," & _ "CONSTRAINT [pk_Id] PRIMARY KEY (Id)) ", conn) conn.Open() cmd.ExecuteNonQ uery() conn.Close() Dim ds As New DataSet Dim da As New OleDb.OleDbData Adapter("Select * from tester", conn) da.Fill(ds) For i As Integer = 0 To 40000 ds.Tables(0).Lo adDataRow(New Object() {i, i.ToString}, False) Next Dim cmb As New OleDb.OleDbComm andBuilder(da) da.Update(ds) Dim ds2 As New DataSet Dim start As Integer = Environment.Tic kCount da.Fill(ds2) MessageBox.Show ((Environment.T ickCount - start).ToString ) End Sub End Class ///
The result is that the Fill part is about 7 times slower in VB2005 than in VB2003
I will put this problem as well in another place.
It does not help you but you know that I had the same result.
Cor
"Stephen Plotnick" <sp*******@grou pcbf.comschreef in bericht news:rJ******* *************** ********@gigane ws.com...
>>All I did was install the VB 2005 and copy the source ccode from the VB.NET (2003)
Private Sub PopulateStoreGr id()
Dim conn As New System.Data.O leDb.OleDbConne ction("Provider =Microsoft.Jet. OLEDB.4.0;Data source=C:\BMA ctivityReportin g.mdb;Persist Security Info=False")
Dim sSQL As String
If Mid(UserNoLink, 1, 1) = "0" Or Mid(UserNoLink, 1, 1) = "9" Then
sSQL = "select BM_NUMBER, STORE_NUMBER, STORE, SHIP_ADDRESS1 as ADDRESS, SHIP_CITY as CITY, SHIP_ST as STATE from BENMOORETABLE"
End If
If Mid(UserNoLink, 1, 1) = "1" Then
sSQL = "select BM_NUMBER, STORE_NUMBER, STORE, SHIP_ADDRESS1 as ADDRESS, SHIP_CITY as CITY, SHIP_ST as STATE from BENMOORETABLE WHERE BDRNo LIKE '" & Mid(UserNoLink, 1, 4) & "'"
End If
If Mid(UserNoLink, 1, 1) = "2" Then
sSQL = "select BM_NUMBER, STORE_NUMBER, STORE, SHIP_ADDRESS1 as ADDRESS, SHIP_CITY as CITY, SHIP_ST as STATE from BENMOORETABLE WHERE RDSNo LIKE '" & Mid(UserNoLink, 1, 4) & "'"
End If
If Mid(UserNoLink, 1, 1) = "3" Then
sSQL = "select BM_NUMBER, STORE_NUMBER, STORE, SHIP_ADDRESS1 as ADDRESS, SHIP_CITY as CITY, SHIP_ST as STATE from BENMOORETABLE WHERE MSNo LIKE '" & Mid(UserNoLink, 1, 4) & "'"
End If
If Mid(UserNoLink, 1, 1) = "4" Then
sSQL = "select BM_NUMBER, STORE_NUMBER, STORE, SHIP_ADDRESS1 as ADDRESS, SHIP_CITY as CITY, SHIP_ST as STATE from BENMOORETABLE WHERE SDSNo LIKE '" & Mid(UserNoLink, 1, 4) & "'"
End If
Dim sSQL2 As String = "select * from BENMOORETABLE"
conn.Open()
Dim da As New System.Data.Ole Db.OleDbDataAda pter(sSQL, conn)
Dim da2 As New System.Data.Ole Db.OleDbDataAda pter(sSQL2, conn)
Try
da.Fill(myD S, "BENMOOR1")
iCount = myDS.Tables("BE NMOOR1").Rows.C ount
da2.Fill(myDS , "BENMOOR2")
myDV = myDS.Tables("BE NMOOR2").Defaul tView
DataGrid1.Dat aSource = myDS
DataGrid1.Dat aMember = "BENMOOR1"
Dim irow As Integer
Dim icol As Integer
irow = 0
DataGrid1.Sel ect(irow)
Dim sStore As String = CType(DataGrid1 .Item(irow, 1), String)
myDV.Sort = "STORE_NUMB ER"
Dim rowIndex As Integer = myDV.Find(sStor e)
Me.LegalName1 .Text = myDV(rowIndex)( "LEGAL_NAME_LIN E1").ToString ()
Me.LegalName2 .Text = myDV(rowIndex)( "LEGAL_NAME_LIN E2").ToString ()
Me.StoreOwner .Text = myDV(rowIndex)( "STORE_OWNER"). ToString()
Me.PhoneNumbe r.Text = myDV(rowIndex)( "PHONE_NUMBER") .ToString()
Me.LegalName3 .Text = myDV(rowIndex)( "LEGAL_NAME_LIN E3").ToString ()
Me.LegalName4 .Text = myDV(rowIndex)( "LEGAL_NAME_LIN E4").ToString ()
Me.EMailAddre ss.Text = myDV(rowIndex)( "E-MAIL_ADDRESS"). ToString()
Fil_Name()
'UpdateScreen (irow)
Catch ex As Exception
MessageBox.Sh ow("Failed to connect to data source")
Finally
conn.Close( )
End Try
End Sub Steve
"Cor Ligthert [MVP]" <no************ @planet.nlwrote in message news:ub****** ********@TK2MSF TNGP02.phx.gbl. .. Stephen,
Sorry for my misunderstandin g. Are you using exactly the same code, because this is the first time I read about your problem.
Cor
"Cor Ligthert [MVP]" <no************ @planet.nlschre ef in bericht news:O9***** *********@TK2MS FTNGP02.phx.gbl ... Stephen, > >>IS there something that could be causing this problem? > Yes a lot, but in most cases (not all) VBNet is faster. > Can you show a piece of your code that does the fill of the datagrid? (only VBNet although I am curious how you use that datagrid in VB6) > > Cor > "Stephen Plotnick" <sp*******@grou pcbf.comschreef in bericht news:Nd**** *************** ***********@gig anews.com... >>I upgraded from VB 2003 to VB 2005. >> >I have a 4000 record table in Access that I'm using oleDB to do a >data adapter fill to a Data Grid. In VB.2003 it takes 2-3 seconds to >load the data grid in vb 2005 it takes aroudn 20 seconds. IS there >somethin g that could be causing this problem? >> > >
"Ken Halter" <Ken_Halter@Use _Sparingly_Hotm ail.comwrote in message news:OO******** *****@TK2MSFTNG P06.phx.gbl...
"GhostInAK" <gh*******@gmai l.comwrote in message
fwiw, I'd like to see any dotNet code run faster than a fully compiled and
optimized VB6 version of that same code. Heck... I'd like to see a dotNet
IDE that starts up in less time than it takes to make a cup of coffee. Oh
well... Quad core CPUs are coming out soon. Maybe then we'll see 386 era
performance from a dotNet app.
--
Ken Halter -
I'm having a hard time trying to figure out if you like .net or not Ken...
--
Posted via a free Usenet account from http://www.teranews.com This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: I.V. Aprameya Rao |
last post by:
Hi
I have to implement a flat file dbms. The basic condition is that
relations will be given in files and i will have to run certain select
project join queries on those relations.
Can someone tell me as to which language will be faster, python or C++??
Aprameya
|
by: Mark Dickinson |
last post by:
I have a simple 192-line Python script that begins with the line:
dummy0 = 47
The script runs in less than 2.5 seconds. The variable dummy0 is never
referenced again, directly or indirectly, by the rest of the script.
Here's the surprise: if I remove or comment out this first line, the
script takes more than 15 seconds to run. So it appears that adding a
redundant line produces a spectacular six-fold increase in speed!
|
by: Neil |
last post by:
I have a situation with an ODBC linked view in an Access 2000 MDB with a SQL
7 back end. The view is scrolling very slowly. However, if I open the view
in an ADP file, it scrolls quickly.
I needed to use an ODBC link for the view because it needs to be editable.
Otherwise, I would have used a pass-through query.
In previous discussions about using an MDB file vs. an ADP file as a front
end for SQL Server, the impression I got was that...
|
by: Arun Kumar |
last post by:
Hi
I am new to .NET. I have VS.NET 2003 and VS.NET 2005 Beta 2 Installed on my
PC.
I created a Windows Application which uses COM object. Its a simple test.
When I Build the application on VS 2003 and building solution and runs
faster than VS 2005. Does it mean if I switch to VS 2005 later this year
when its released it going to be slower than VS 2003?
Program I created was using C#.NET
|
by: Brian Henry |
last post by:
is there any speed diffrences between doing Ctype or directcast? I know
about the inherite diffrences, but process usage time wise, does one take up
more cycles then the other? thanks
| |
by: Jeff Gaines |
last post by:
I have just installed VS 2005 (MSDN version) and it's brought my
network to its knees.
All my data is on a server with a 100 Mbps connection. I was getting
messages that the share couldn't be trusted so I used mscorcfg.msc
(?sp) to update the trusts and I don't get that message any more.
Copying files to the Visual Studio 2005 project folder in Explorer is
taking forever, to the stage where Explorer is shown in Task Manager as
'Not...
|
by: Mike Kelly |
last post by:
Hi. I've built a page using standard ASP.NET 2.0 features and when I upload a
large file (>20MB) to our intranet server, I get a paltry 100KB/s on our
100Mb/s LAN. Simply copying the file, I get around 7MB/s.
I'm using a FileUpload control on an .aspx page, and then I'm writing the
MyFileUpload.PostedFile.InputStream off to a database.
What can I do to speed up this uploading?
Thanks in advance
|
by: byteschreck |
last post by:
I recently switched temporarily from C# to VB.NET to see what the
differences are.
To my surprise I am *much* faster with VB.NET. I don't know why,
pressing the shift key to capitalize letters slows me down
tremendously, among having to type a semicolon after each statement,
not having intelligent auto-complete and auto-indentation and not
having the (evil, maybe) with statement ...
I also like the horizontal lines that clearly...
|
by: =?Utf-8?B?TWFyayBT?= |
last post by:
I have an application that consists of a managed C++ wrapper around an
unmanaged C++ "engine" that performs a very processor intensive task. In
the application I create two instances of the managed wrapper (and therefore
of the unmanaged engine) on separate threads so that it can be working on two
scenarios at the same time. The engine keeps track of certain counters so
that I can monitor it's progress.
However, I'm finding that the...
|
by: Ben |
last post by:
We recently upgraded our MS SQL Server 2000 to 2005.
Here is what we did:
1. Perform backup of the database from the old server.
2. Created a blank database in the new server.
3. Restored the database into the blank database located in the new server.
After this process, there was an obvious slowness in the MS Access
application. Program-wise, I did not do any code changes. The only thing
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
| |
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,...
|
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,...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |