[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1457
  • Last Modified:

sql to ado.recordset very slow

I'm using ado object in VB6 with an sql recordset. My code is:

Set RSord = New ADODB.Recordset
RSord.Source = "select * from Orders where IDOrder = " & strIDord
RSord.Open

Opening the recordset it is very fast.
But after the following instruction:

Set frm.AdOrd.Recordset = RSord

this is very very slow.

Any ideas?

Thanks in advance for any suggestion.
0
DONADIE
Asked:
DONADIE
1 Solution
 
Anthony PerkinsCommented:
How big is the resultset?
0
 
sameer2010Commented:
Can you try specifying other parameters in the connection string? e.g. batch optimistic, etc. This would avoid locking and its especially important if it is a huge dataset.
Also, what are you doing after setting the recordset? If it is going to be open for a longer duration, yo are better off getting the data and disconnecting it and again connecting when needed.
0
 
DONADIEAuthor Commented:
The resultset is around 30 fields.
the ADODC object it used to populate textboxes on a form.

I'll try to use other parameters (batch optimistic etc.) but I'm using the same object, same code, same server with SQL server 2005 installed, on other application with no problems.

Could be a firewall or other restriction on the network?
Many thanks.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
Anthony PerkinsCommented:
>>The resultset is around 30 fields.<<
I mean how many rows.
0
 
DONADIEAuthor Commented:
Only one rows.
0
 
Eugene ZCommented:
what is your sql server version edition?
do you have latest vb6 sp installed?
make sure to install fresh MDAC..
--
You may need to try to use another provider and\or connection  string.
check
http://connectionstrings.com/
0
 
DONADIEAuthor Commented:
I will check all suggested issues.

Thanks a lot.

Donatella
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now