コード例 #1
0
ファイル: SQLConnection.cs プロジェクト: laszlo-kiss/Dataphor
 public void Execute(string AStatement, SQLParameters AParameters)
 {
     CheckConnectionValid();
     using (SQLCommand LCommand = CreateCommand())
     {
         LCommand.Statement = AStatement;
         LCommand.Parameters.AddRange(AParameters);
         LCommand.Execute();
     }
 }
コード例 #2
0
 public void Execute(string statement, SQLParameters parameters)
 {
     CheckConnectionValid();
     using (SQLCommand command = CreateCommand(false))
     {
         command.Statement = statement;
         command.Parameters.AddRange(parameters);
         command.Execute();
     }
 }
コード例 #3
0
ファイル: SQLConnection.cs プロジェクト: laszlo-kiss/Dataphor
        public SQLCursor Open(string AStatement, SQLParameters AParameters, SQLCursorType ACursorType, SQLIsolationLevel ACursorIsolationLevel, SQLCommandBehavior ABehavior)
        {
            CheckConnectionValid();
            SQLCommand LCommand = CreateCommand();

            try
            {
                LCommand.Statement = AStatement;
                LCommand.Parameters.AddRange(AParameters);
                LCommand.CommandBehavior = ABehavior;
                return(LCommand.Open(ACursorType, ACursorIsolationLevel));
            }
            catch
            {
                LCommand.Dispose();
                throw;
            }
        }
コード例 #4
0
        public SQLCursor Open(string statement, SQLParameters parameters, SQLCursorType cursorType, SQLIsolationLevel cursorIsolationLevel, SQLCommandBehavior behavior)
        {
            CheckConnectionValid();
            SQLCommand command = CreateCommand(true);

            try
            {
                command.Statement = statement;
                command.Parameters.AddRange(parameters);
                command.CommandBehavior = behavior;
                return(command.Open(cursorType, cursorIsolationLevel));
            }
            catch
            {
                command.Dispose();
                throw;
            }
        }