Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old August 9th, 2005, 10:14 PM
dawnong dawnong is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Mar 2005
Posts: 45 dawnong User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 31 m 55 sec
Reputation Power: 4
Red face SQL server with VB 6.0

HI,

I have 20,000 over of data in my SQL database under a table. When i load the data in VB 6.0 programming, I faced slow loading speed in moving the recordset to one specific position. Does anyone knows how can I program it in the way that I can speed up the loading time?

Thanks
dawn

Reply With Quote
  #2  
Old August 9th, 2005, 11:08 PM
Doug G Doug G is offline
Grumpier Old Moderator
ASP Free God 11th Plane (10000 - 10499 posts)
 
Join Date: Sep 2003
Posts: 10,143 Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 3 Weeks 4 Days 23 h 19 m 36 sec
Reputation Power: 181
Quote:
Does anyone knows how can I program it in the way that I can speed up the loading time?
Without any code showing how you programmed it in a slow way, it's hard to say.

One issue may be indexing of your tables in the database. SQL Serve has many tools to help you optimize your database. I have a remote hosted sql server with 1,000,000+ record tables and opening any recordsets are quite quick.
__________________
======
Doug G
======
I didn't attend the funeral, but I sent a nice letter saying I approved of it. --Mark Twain

Reply With Quote
  #3  
Old August 9th, 2005, 11:19 PM
dawnong dawnong is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Mar 2005
Posts: 45 dawnong User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 31 m 55 sec
Reputation Power: 4
RSHeader.Open cSQL4RSHeader, GlobalSQLConn, adOpenKeyset, adLockOptimistic, adCmdText
ReadTableRecordCounter
RSHeader.MoveFirst
RSHeader.Find "DOCREF='" & gHelpSelection1 & "'"
Screen.MousePointer = vbDefault
If Not RSHeader.EOF Then
' MsgBox gHelpSelectionCompleted & gHelpSelection1 & " - " & cSQL4RSHeader
TxtDataInfo(0).Text = gHelpSelection1
ReadRow
End If

After I click on the record which I want view, I need to move the recordset to the first record and start the recordset to search for that record. But the time for the SQL server to search for the record is slow. How should I code to improve the search? i'm searching in one table only.

Thanks
dawn

Reply With Quote
  #4  
Old August 10th, 2005, 02:08 PM
Doug G Doug G is offline
Grumpier Old Moderator
ASP Free God 11th Plane (10000 - 10499 posts)
 
Join Date: Sep 2003
Posts: 10,143 Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 3 Weeks 4 Days 23 h 19 m 36 sec
Reputation Power: 181
I'd recommend you rething your approach and use the database to locate record(s) with the WHERE clause in your SQL. If your recordset SQL (which you didn't show) selects all records from the table, and you then use the find method of the recordset, the find will need to search through every record in the recordset which may involve many round-trips between your recordset object and the database server.

If you restrict the records in the SQL string, your recordset will only be populated with the necessary records and will be much quicker.

Reply With Quote
  #5  
Old August 15th, 2005, 04:17 AM
dawnong dawnong is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Mar 2005
Posts: 45 dawnong User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 31 m 55 sec
Reputation Power: 4
Wink

Hi,

Thanks alot... You are right as i have selected all the records from the table because I have to view all the details in it.

If selecting all the records is not the ideal way, I will use SQL to return smaller recordset from the server. Thanks for your advise.

Thanks,
Dawn

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingVisual Basic Programming > SQL server with VB 6.0


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
Stay green...Green IT