hao's profile日月之行PhotosBlogLists Tools Help

Blog


    5/30/2007

    MS Access, 不好

     

    1、@参数的顺序必须与下面的SQL语句中出现@参数的先后顺序一致,MS SQL则不用。

    2、Memo字段在查询时可能会被截断:

    Issue Explanation Workarounds
    Aggregation When you depress the  Σ  button, Access adds a Total row to the query design grid. If you leave Group By under your memo field, it must aggregate on the the memo, so it  truncates.

    Choose First instead of Group By under the memo field. The aggregation is still preformed on other fields from the table, but not on the memo, so Access can return the full memo.

    The field name changes (e.g. FirstOfMyMemo), so change the name and Control Source of any text boxes on forms/reports.

    Uniqueness Since you asked the query to return only distinct values, Access must compare the memo field against all other records. The comparison causes truncation.

    Open the query's Properties Sheet and set Unique Values to No. (Alternatively, remove the DISTINCT key word in SQL View.)

    You may need to create another query that selects the distinct values without the memo, and then use it as the source for another query that retrieves the memo without de-duplicating.

    UNION query A UNION query combines values from different tables, and de-duplicates them. This means a comparing the memo field, resulting in truncation. In SQL View, replace UNION with UNION ALL.
    Format property The Format property processes the field, e.g. forcing display in upper case (>) or lower case (<). Access truncates the memo to reduce this processing.

    Remove anything from the Format property of:

    • the field in table design (lower pane);
    • the field in query design (properties sheet);
    • the text box on your form/report.