在 SQL Server Compact 版本中,如何在以编程方式创建数据库时定义整数?我试过了int
,,,,它们都不起作用Int32
,Bigint
它们都抛出异常,说数据类型无效?
string createTable6 = "CREATE TABLE Gates (Gate1In Bigint(5), Gate1Out Bigint(5), Gate2In Bigint(5), Gate2Out Bigint(5), Gate3In Bigint(5), Gate3Out Bigint(5), Gate4In Bigint(5), Gate4Out Bigint(5), Gate5In Bigint(5), Gate5Out Bigint(5))";
SqlCeConnection connexion6 = new SqlCeConnection(connectionString);
SqlCeCommand table6 = new SqlCeCommand(createTable6, connexion6);
try
{
connexion6.Open();
table6.ExecuteNonQuery();
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
connexion6.Close();