【发布时间】:2013-10-20 14:20:03
【问题描述】:
在 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();
【问题讨论】:
标签: c# sql winforms sql-server-ce