DesktopHelper.DB.SqlAction.IntQuery C# (CSharp) Method

IntQuery() public method

执行查询SQL,返回受影响行数
public IntQuery ( string sql, SQLiteParameter parameters ) : int
sql string sql语句
parameters System.Data.SQLite.SQLiteParameter 参数
return int
        public int IntQuery(string sql, SQLiteParameter[] parameters)
        {
            int result = 0;
            try
            {
                SQLiteDBHelper dbHelper = new SQLiteDBHelper();
                result = dbHelper.ExecuteNonQuery(sql, parameters);
            }
            catch
            {
            }
            return result;
        }

Usage Example

Beispiel #1
0
 public int ClearConfigWebsite()
 {
     int result = 0;
     try
     {
         string sqlString = @"delete from t_website_config";
         SqlAction action = new SqlAction();
         result = action.IntQuery(sqlString, null);
     }
     catch
     {
     }
     return result;
 }
All Usage Examples Of DesktopHelper.DB.SqlAction::IntQuery