我在运行时创建了一个MS Access数据库,并试图创建一个表。 下面的代码在运行时创建表时显示错误“CREATE TABLE语句中的语法错误”。CREATE TABLE语句中的语法错误
cmmd.CommandText = "CREATE TABLE tblContacts([SectionID] AUTOINCREMENT PRIMARY KEY,[ScetionName] Text(50), [CatID] Number(Integer), [Rate] Number(Double), [Prefix] Text(5), [Suffix] Text(5), [NextNumber] Number(Integer), [Inactive] Yes, [ModUserID] Number(Integer),[ModDate] Date)";
cmmd.ExecuteNonQuery();
[通过学习基础知识( http://msdn.microsoft.com/en-us/library/ms971485.aspx) – Sadique
看看这个问题:http://stackoverflow.com/questions/1388971/how-i-create-access-database- at-runtime-in-c – BudBrot