I have some code to directly use a table like this.
mytable.append;
mytable.fieldbyname('field1').aswidestring:= 'myvalue1';
mytable.fieldbyname('field2').aswidestring:= 'myvalue2';
mytable.fieldbyname('field3').aswidestring:= 'myvalue3';
mytable.post;
Using the UniTable this fails with the error "TBLID must have a value".
This happens when using the AccessProvider.
TBLID is the auto-number column for this table in the access version of my database. This code still works with the UniDAC SQLServerProvider with the MSSQL version of the database.
What am I missing here?
Thanks.
UniTable Issue Posting
-
johnbitner
- Posts: 22
- Joined: Thu 10 Sep 2009 16:18
- Location: United States
Currently Access provider cannot detect autoincrement fields. You can assing a value to TBLID manually or set the RequiredFields option of TUniQuery to False. In the second case posting will be successfull but the value generated in the database will not be assigned to the field of TUniTable.
We will try to add support for autoincrement fields in one of the next UniDAC versions.
We will try to add support for autoincrement fields in one of the next UniDAC versions.
I have several tables in access that have AUTONUMBER and no matter what I do, I cannot insert a record into any of the tables.
I get the error message - "Field 'ID' cannot be modified" (ID is the FTAutoInc Field in the table for this error)
Is their a status on when this will be supported. It is a show-stopper for me.
I get the error message - "Field 'ID' cannot be modified" (ID is the FTAutoInc Field in the table for this error)
Is their a status on when this will be supported. It is a show-stopper for me.