0
在SQL Server Compact Edition中,如何以編程方式創建數據庫時定義整數?我試過int
,Int32
,Bigint
,他們都沒有工作,他們都拋出一個異常說數據類型無效?SQL Server Compact在未知數據類型上拋出異常?
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();