Filter on query of linked tables

  • Thread starter Thread starter Sunny
  • Start date Start date
S

Sunny

I am using linked tables in my application. My tables are stored on SQL
server and linked into my application through ODBC connection. I have
created one query(myQuery) on my linked tables.

On one form I have listbox and I use the following code:

lstClients.RowSource = "Select * From MyQuery WHERE myCondition"

This gives me very slow response.

Question is, This statement pulls all the data from SQL server and then
filters or it pulls the final result?

Thanks.
 
Sunny said:
I am using linked tables in my application. My tables are stored on SQL
server and linked into my application through ODBC connection. I have
created one query(myQuery) on my linked tables.

On one form I have listbox and I use the following code:

lstClients.RowSource = "Select * From MyQuery WHERE myCondition"

This gives me very slow response.

Question is, This statement pulls all the data from SQL server and then
filters or it pulls the final result?

Thanks.

Impossible to say from this information. Use the SQL Profiler to see what
SQL is actually arriving at the server. Check that the columns relevant to
myCondition are properly indexed.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top