very slow query on access databse over Lan dir

LUCA90's Avatar, Join Date: Mar 2009
Light Poster
I use the tipical ado jet ole 4.0 connection and VB6 classic. for example:

Set CONN = New ADODB.Connection
With CONN
.Open _
"Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=C:\DATABASE\QA1.mdb;" & _
"Jet OLEDB:Engine Type=4;"
.Properties("Jet OLEDB:Max Locks Per File") = 25000000
End With

and i open the recordset with:

Set RSTX = New ADODB.Recordset
RSTX.CursorLocation = adUseClient
SQL = "SELECT ecc where ecc"
RSTX.Open SQL, CNT, adOpenStatic, adLockReadOnly, adCmdText

but the result of query is very very very slow.

I need assistente for conn and recordset.for correwt the setting

suggest my is i need to add cursor type or change completly the strategy.
Tks
0
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
Is the connection slow or execution of query slow?
0
LUCA90's Avatar, Join Date: Mar 2009
Light Poster
Quote:
Originally Posted by shabbir View Post
Is the connection slow or execution of query slow?
only the query.
But i think a good connection improve the good query.
0
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
Quote:
Originally Posted by LUCA90 View Post
only the query.
But i think a good connection improve the good query.
A select statement should not be very slow

SQL = "SELECT ecc where ecc"

And so it has to be your connection. Try connecting to your local Access and see if it is this slow.