Would anyone have the heart to post some example code to create an empty table? My code doesn't seem to work, it says the data type "int" in invalid...here's what I have:
if (File.Exists(ExecutablePath + "\\idcc_data\\_IDCC.sdf") == true)
{
SqlCeCommand cmd;
SqlCeConnection connection = new SqlCeConnection("DataSource=" + ExecutablePath + "\\idcc_data\\_IDCC.sdf");
connection.Open();
// the file exists let's create the user table
string UserTableCreate = "CREATE TABLE tblUsers ("
+ "ID int (11) NOT NULL AUTO_INCREMENT, "
+ "txtUser nvarchar (40), "
+ "mdaPass text, "
+ "intALevel tinyint (2) )";
cmd = new SqlCeCommand(UserTableCreate, connection);
cmd.ExecuteNonQuery();
connection.Close();
}
Some simple sample code would be great...I guess I just can't figure the syntax out and I've looked everywhere, nothing seems to work.