I have a MS ACCESS 2003 datatbase that have one table in it “TABLEA”.
Then I use OLEDB connection and create a table and then fill the data programatically as:
string create_table_script = @" CREATE TABLE [" + Path.GetFileNameWithoutExtension(filename) + @"](
[AutoID] COUNTER PRIMARY KEY ,
[CAS] text(255) ,
[Listed French Ingredient No] text(255) ,
[Name] text(255) ,
[GC] text(20) ,
[Grp_Code] text(10) ,
[Galsyn] Memo ,
[Notes LCN] text(255) ,
[Notes LFIN] text(255) ,
[%w/w] text(255) )";
string connectionString = @"Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" + fullpath + ";" + " User Id=admin; Password=";
using (OleDbConnection connection = new OleDbConnection(connectionString))
{
OleDbCommand SelectCommand = new OleDbCommand(create_table_script, connection);
connection.Open();
try
{
SelectCommand.ExecuteNonQuery();
}
catch (OleDbException ex)
{
Console.WriteLine(ex.Message);
}
finally
{
connection.Close();
}
}
After filling this table,
I get this message only once whenever i open this access datatbase
“31613 You have selected “Tables and Related Views” as the way to group objects in the database. Access needs to update information on object dependencies to create the groups. This will take some time for large databases.Do you want to continue?”
I don’t know where i am wrong. I goggled it for this but does not get any benefit.
I think there is some thing wrong in create table
Any help is appreciated.
This is an Access issue regarding navigation in the “Navigation Pane (Shutter Bar)” and has nothing to do with the way you are creating the table. You can safely ignore this issue because it is Access specific and not related to OleDb