Exemple #1
0
        public SQLiteCommand CreateCommand(string cmdText, params object[] ps)
        {
            if (!_open)
            {
                throw SQLiteException.New(SQLite3.Result.Error, "Cannot create commands from unopened database");
            }
            SQLiteCommand sQLiteCommand = NewCommand();

            sQLiteCommand.CommandText = cmdText;
            foreach (object val in ps)
            {
                sQLiteCommand.Bind(val);
            }
            return(sQLiteCommand);
        }
Exemple #2
0
 public SQLiteCommand CreateCommand(string cmdText, params object[] ps)
 {
     if (!_open)
     {
         throw SQLiteException.New(SQLite3.Result.Error, "Cannot create commands from unopened database");
     }
     else
     {
         var cmd = new SQLiteCommand(_db);
         cmd.CommandText = cmdText;
         foreach (var o in ps)
         {
             cmd.Bind(o);
         }
         return(cmd);
     }
 }