开发者

SQLITE3+ Catnap + MonoTouch alter table add column pb

开发者 https://www.devze.com 2023-02-17 05:30 出处:网络
I don\'t understand, here 开发者_运维百科is my problem : string sql=\"alter table mytable add CellarPosition integer; alter table mytable add Quantity integer;alter table mytable add CreatingYear int

I don't understand, here 开发者_运维百科is my problem :

   string sql="alter table mytable add CellarPosition integer; alter table mytable add Quantity integer;  alter table mytable add CreatingYear integer; alter table mytable add OptimalYear integer;";

                var command = new DbCommandSpec().SetCommandText(sql);

                unitofwork.Session.ExecuteNonQuery(command);

the only first alter table executes but the others does not . any suggestion?????


It is possible that SQLite might not be able to chain several Alter table queries. I'd suggest doing them one at a time for simplicity.


If it had been MySQL, you would do something like this: alter table mytable add CellarPosition integer ,add Quantity integer ,add CreatingYear integer ,add OptimalYear integer;

0

精彩评论

暂无评论...
验证码 换一张
取 消