Consulting

Results 1 to 3 of 3

Thread: Access/SQL Sever - to link or not to link

  1. #1
    VBAX Master stanl's Avatar
    Joined
    Jan 2005
    Posts
    1,141
    Location

    Access/SQL Sever - to link or not to link

    is probably not the question, but more like the sliding scale. I have large related SQL Server [2005] tables where a date is stored as varchar, i.e. '4/24/2008' -

    and I run queries for data from several tables based on a >= of that date.

    If run via ADO I use Convert(datetime,[field])>='mm/dd/yyyy' and if tables are linked to an Access DB, cDate([field])>=#mm/dd/yyyy#.

    You would expect the Native query would return rows faster, but in fact the Access query is about 4 times faster, even though there appears more overhead is involved. However, there has to be a threshold where ADO would surpass.

    Just wondering if anyone has seen similar behavior. Stan

  2. #2
    VBAX Expert
    Joined
    Jul 2004
    Location
    Wilmington, DE
    Posts
    600
    Location
    stanl,

    Have you tried running it as a pass-through query?
    Regards,

    Patrick

    I wept for myself because I had no PivotTable.

    Then I met a man who had no AutoFilter.

    Microsoft MVP for Excel, 2007 & 2008

  3. #3
    VBAX Master stanl's Avatar
    Joined
    Jan 2005
    Posts
    1,141
    Location
    Quote Originally Posted by matthewspatrick
    stanl,

    Have you tried running it as a pass-through query?
    I think you missed the point of the post - it was more to indicate that perhaps VBA's cDate() is more optimized than Convert() - to a point - regardless as to whether the Access query is pass-through or not it is still faster - to a point.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •