I am migrating a full framework .NET app to core. It used ADOX to create an MS Access database and tables. It used OLE DB to populate data. In ADOX, the data type was
ADOX.DataTypeEnum.adInteger and the syntax from c# was:
fld.Properties["Autoincrement"].Value = true; fld.Properties["Seed"].Value = 1; fld.Properties["Increment"].Value = 1;
memo, ADOX data type was
Since we can no longer use ADOX under .NET Core, I have to use SQL DML through ODBC. When I attempt to create a table using syntax similar to
create table t ( col1 int not null identity(1,1), col2 varchar(512) )
I get a syntax error. When I try to adjust this for Access according to this and other related articles in the same documentation tree, I also get syntax error.
create table t ( col1 counter, col2 text )
What is the correct syntax for these columns that is compatible with .NET Core and MS Access ODBC driver?