日期:2014-05-18  浏览次数:21213 次

C#中 调用插入列的SQL语句,代码求帮忙啊! 急急急急急急急急。。
SQL语句是 ’alter table C_Account add JOBNUM VARCHAR(20)‘
代码是:
  { 
  clsSqLiteInstance sqlinst = new clsSqLiteInstance("MainChanged.db");
  string sql = string.Format("alter table C_Account add JOBNUM VARCHAR(20)");
  sqlinst.ExecuteCommandNoAuto(sql);-----就是这句不知道怎么写  
  sqlinst.Close();
  }

public int ExecuteCommandNoAuto(string safeSql)
  {
  SQLiteCommand cmd = new SQLiteCommand(safeSql, _sqlceconnection);
  int result = cmd.ExecuteNonQuery();
  return result;
  }

------解决方案--------------------
就直接写成这样调用啊:ExecuteCommandNoAuto(sql); 
还有SQL应该是"alter table C_Account add column JOBNUM VARCHAR(20)"
------解决方案--------------------
接分啊
------解决方案--------------------
一定要认真 要仔细啊