Go Back   { mindfrost82.com } > Gadget Corner > Tech Newsgroups > Microsoft > MS Office > Access > Support Documents

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-08-2006, 12:59 PM
mindfrost82's Avatar
Administrator
 
Join Date: Mar 2006
Location: Illinois
Posts: 2,170
Sex: Male
My Mood:
Thanks: 5
Thanked 5 Times in 5 Posts
Send a message via ICQ to mindfrost82 Send a message via AIM to mindfrost82 Send a message via MSN to mindfrost82 Send a message via Yahoo to mindfrost82
Microsoft Jet Does Not Pass WHERE Clause to ODBC

ACC2000: Microsoft Jet Does Not Pass WHERE Clause to ODBC Data Source

The information in this article applies to:
• Microsoft Access 2000 Service Release 1 (SR-1)
• Microsoft Data Access Components version 2.6

Advanced: Requires expert coding, interoperability, and multiuser skills.

This article applies only to a Microsoft Access database (.mdb).

SYMPTOMS
When you use Access 2000 Service Release 1 (SR-1) with Microsoft Jet 4.0 Service Pack 5 (SP5) to query tables linked from two separate databases on the same server, you may find that Jet does not pass the WHERE clause parameters to the ODBC data source when both of the following are true:
• The query creates a join between the two tables.
• The query contains a WHERE clause that uses both the OR and the AND operators.
You may find that query performance is extremely slow when you query large sets of data under these conditions. Saving the password when you link the tables may or may not affect performance. This only affects Msjet40.dll version 4.0.4431.x

CAUSE
Jet does not send the WHERE clause for one or for both queried tables. This causes the server to return all rows to the client.

STATUS
Microsoft has confirmed this to be a problem in the Microsoft products that are listed at the beginning of this article.

MORE INFORMATION
Steps to Reproduce the Behavior
1. On a computer that is running Microsoft SQL Server 7.0, use Enterprise Manager to create a new database called pubs2.
2. Open Enterprise Manager.
3. Expand the server group for the local server.
4. Right-click Databases , and then select the option to create a new database (accept all defaults).
5. Change the new database name to pubs2 , and then close the dialog box.
6. Copy the Authors table from pubs to pubs2, either by using Enterprise Manager or by executing the following SELECT statement in Query Analyzer:
SELECT * INTO pubs2..authors FROM pubs..authors
7. Create a new database in Access called Test.mdb .
8. Create a new system DSN TestPubs to SQL 7.0 server. Change the default database to pubs and supply a valid userid and password.
9. Create a new system DSN TestPubs2 to SQL 7.0 server. Change the default database to pubs2 and supply a valid userid and password.
10. Link pubs.titleauthor to Test.mdb by using "TestPubs." Do not save the password.
11. Link pubs2.authors to Test.mdb by using "TestPubs2." Do not save the password.
12. Create the following new query in Design view in Test.mdb:
SELECT dbo_authors.au_id, dbo_authors.au_lname, dbo_titleauthor.title_id
FROM dbo_authors INNER JOIN dbo_titleauthor ON dbo_authors.au_id = dbo_titleauthor.au_id
WHERE (dbo_authors.au_lname = "Ringer" AND dbo_titleauthor.title_id = "PS2106") OR dbo_authors.au_lname = "White"
13. Save the query as qSel2Authors .
14. Quit Access.
15. Start tracing from the ODBC Data Sources tool in Control Panel.
16. Open Test.mdb, and then execute qSel2Authors.
17. Quit Access.
18. Stop tracing in the ODBC Data Sources tool in Control Panel.
19. Open the trace log in Microsoft Word 2000.
20. Search for au_id in the trace log.

Note the SELECT statement sent and records returned.
21. Search for title_id in the trace log.

Note the SELECT statement sent and records returned.
Reply With Quote
Reply

  { mindfrost82.com } > Gadget Corner > Tech Newsgroups > Microsoft > MS Office > Access > Support Documents


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 11:54 AM.


Powered by vBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
© 1999-2008 mindfrost82.com v11.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109