473,387 Members | 1,760 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,387 software developers and data experts.

speed uo to read rset from SQL Express

27 16bit
i use ths qery to read rset from sql Express and populate a treeview...
But really the operation is very slow...!!!!

this is a part of code:
\\\\\\\\\\\\\\\\\\
'CNSQL.Open "Provider= SQLOLEDB.1; Integrated Security=SSPI;Persist Security Info=False;Intitial Catalog=TEST_DB_PAST_DUE;Data Source=MY-F0D2D0395FFE\SQLEXPRESS;"
\\\\\\\\\\\\\\\\\\\\

Expand|Select|Wrap|Line Numbers
  1.  
  2.     With FORM_TREEVIEW_.TreeView1
  3.  
  4.         'ADOOpenRecordSet SSQL
  5.  
  6.         Call setUpListView
  7.         Set RSSQL2 = CNSQL.Execute("Query1")    ', adOpenForwardOnly, adLockReadOnly
  8.         'CNSQL.Execute ("Query1"), adOpenForwardOnly, adLockReadOnly
  9.  
  10.        RSSQL2.CursorLocation = adUseServer
  11.         RSSQL2.MoveFirst
  12.         Do Until RSSQL2.EOF
  13.             sValue = Trim(RSSQL2.Fields("COD_AREA").value)
  14.             sKey = "K" & sValue
  15.             .Nodes.Add , , sKey, sValue & " - " & Trim(RSSQL2.Fields("DESCRIZIONE")), 1, 1
  16.             'Debug.Print sValue & " - " & Trim(RSSQL2.Fields("DESCRIZIONE"))
  17.             sValue = Trim(RSSQL2.Fields("SPORT").value)
  18.             'sSQL = .Nodes.Count
  19.             'Z = Z + 1
  20.             .Nodes.Add sKey, tvwChild, "L" & sValue, sValue & " - " & Trim(RSSQL2.Fields("DESCRIZIONE2")), 1, 2
  21.             sKey = "L" & sValue
  22.             sValue = Trim(RSSQL2.Fields("PROVA3"))
  23.             'sSQL = .Nodes.Count
  24.             .Nodes.Add sKey, tvwChild, "M" & sKey & sValue, sValue, 1, 2
  25.             sKey = "M" & sKey & sValue
  26.             sValue = "COPE - " & Trim(RSSQL2.Fields("PROVA1"))
  27.             .Nodes.Add sKey, tvwChild, "N" & sValue, sValue, 1, 2
  28.             '.Nodes.Item(sKey).EnsureVisible
  29.             RSSQL2.MoveNext
  30.             'sSQL = .Nodes.Count
  31.         Loop
  32.     End With
  33.  
  34.  
Feb 1 '09 #1
1 1999
ck9663
2,878 Expert 2GB
Run your query in SQL Analyzer. Try to see if it runs to your satisfaction. If it did, then your problem is on your front-end, which looks like a .Net

-- CK
Feb 1 '09 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

26
by: Adrian Parker | last post by:
I'm using the code below in my project. When I print all of these fixed length string variables, one per line, they strings in questions do not properly pad with 0s. strQuantity prints as " ...
2
by: armin walland | last post by:
hi group! i am writing a small tool to dump data from oracle databases and i want to implement the possibility to execute sql statements read from stdin or from a file. i have so far managed...
52
by: Neuruss | last post by:
It seems there are quite a few projects aimed to improve Python's speed and, therefore, eliminate its main limitation for mainstream acceptance. I just wonder what do you all think? Will Python...
7
by: Shimon Sim | last post by:
I have a custom composite control I have following property
10
by: Ali Chambers | last post by:
Hi, I've written a programme that processes stock market price data in VB.NET 2005 Express. I've optimised the code as much as possible, eg:- using arrays, not passing parameters to functions,...
17
by: Igor | last post by:
Can I use access for big database (cca 10-30 MB, cca 10-30k lines in database). It will be asp.net 2.0 aplication and very fast server. Mostly simple transactions (like SELECT * From Books Where...
25
by: Marco | last post by:
Hi everyone. I've been trying to move some small applications written in vb.net 2003 to vb.net 2005 express just for testing purposes. I have noticed so far that the applications seem to run ...
2
by: rodny.romero | last post by:
Somebody can help me with an example of like Reading post office with VB.Net using protocol POP3, I have obtained the commandos or instructions that protocol POP3 supports, but I have not been able...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.