PRJ4: Errors Using Open From and Save To Database Commands |
Q126942
When you use the Save To Database or Open From Database commands to save a
file to or open a file from a Microsoft Access database, you may experience
the following unexpected behavior:
Data buffer doesn't match column size
-or-. . . not valid
Field exceeds maximum size . . .
This problem occurs for one of two reasons:
Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article.
The Save To Database command saves the active project as a temporary MPX
file, and then parses the MPX file and writes data to a Microsoft Access
database. When Microsoft Project saves an MPX file, any quotation mark in a
project field is replaced by two quotation marks in the corresponding MPX
field. If a project field contains commas, the entire MPX field is
surrounded by an extra pair of quotation marks. When the Save To Database
command parses the MPX records, it does not correctly interpret a pair of
quotation marks that represents a single quotation mark. If an MPX text
type field starts with a quotation mark, Save To Database incorrectly
determines the end of the field by searching for a quotation mark followed
immediately by a comma or the end of the record.
If the contents of a Microsoft Project text field includes a quotation mark
followed immediately by a comma, Save To Database incorrectly splits it
into two Microsoft Access fields, shifting other project fields into the
wrong fields in Microsoft Access. It may also write records out of order.
The example below shows the contents of the Text1 field in a project, how
it is represented in the MPX task record, and how Save To Database
incorrectly splits it (three dots represents omitted data):
MS Project MPX MS Access
Text1 Part of task record Text1 Text2
-------------------------------------------------------------
"a",b ...,"""a"",b",... ""a" b"
"c","d" ...,"""c"",""d""",... ""c" "d""
Task Name in project: "a
Part of MPX record: ...,""a,,0,0,0,0,0,0,1,1,...,0h
Name field in Access ""a,,0,0,0,0,0,0,1,1,...,0h
If Save To Database tries to write more characters to a Microsoft Access
field than the field allows, then it fails with the Microsoft Access error
message:
If Save To Database succeeds in writing bad data to the Access database, then errors may occur later when you use Open from Database. The Open from Database command creates a temporary MPX file from the Access database and then Microsoft Project opens it. If the wrong kind of data for a field is read from the MPX file, then a Microsoft Project message of the form ". . . not valid" occurs. For example, if bad data is read for the Flag1 field from task record 2, column 5 of the MPX file, then the following Microsoft Project error message occurs:Data buffer doesn't match column size
Depending on the offending field, the second line in the message could be "Predecessor list not valid," "Date not valid," "Work not valid," or other similar statements. If a field in the MPX file contains too much data, then an additional message may occur. For example, if a field in line 17 of the MPX file contains too many characters, then the following Microsoft Project error message occurs (after choosing Yes to all of the above messages or by choosing No to one of them):Row 2 Column 5
Value not valid; must be Yes or No
Choose Yes to continue messages, No to stop
messages, Cancel to stop import.
Field exceeds maximum size and has been truncated (line #17). It may no longer be valid.
Additional query words: Data buffer doesn t match column size
Keywords : kberrmsg
Issue type : kbbug
Technology :
|
Last Reviewed: November 3, 2000 © 2001 Microsoft Corporation. All rights reserved. Terms of Use. |