Error retrieving MSAccess fields
Brought to you by:
edwardbenson
Borland Delphi 6 & 7
dbxoodbc dll versions 2 & 3
When retrieving fields from a MSAccess 2000 table, all
fields have ReadOnly and Required properties set to false.
But if there is an autoincrement field, this field AND ALL
SUBSEQUENT FIELDS have ReadOnly property set to true!
For the autoincrement field this is correct, but for the
other fields it's wrong.
Thanks
Fulvio
Logged In: YES
user_id=644745
Add in a line of connection a flag: "coFldReadOnly=0".
database = ' DSN=MyDsn; coFldReadOnly=0 '
We receive the information on availability of a field through a
call odbcapi functions SQLColAttributeInt:
file: DbxOpenOdbc.pas
...
function TSqlCursorOdbc.isReadOnly (ColumnNumber: Word;
...
OdbcRetcode: = SQLColAttributeInt (fHStmt,
aOdbcBindCol.fOdbcColNo, SQL_DESC_UPDATABLE,
Why that in the majority of realizations it works incorrectly.
Assignment to a flag coFldReadOnly values "0" will allow to
see all fields accessible on editing.
ps:
You are probably right and it is really necessary to alter
assignment of attribute ReadOnly only for AutoInc fields. I
shall try it to make in the following version.