Ejemplo n.º 1
0
        public FbScript(string script)
        {
            if (script == null)
            {
                throw new ArgumentNullException();
            }

            _results       = new FbStatementCollection();
            _parser        = new SqlStringParser(script);
            _parser.Tokens = new[] { ";" };
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Creates an instance of FbBatchExecution engine with the given
 /// connection.
 /// </summary>
 /// <param name="sqlConnection">A <see cref="FbConnection"/> object.</param>
 public FbBatchExecution(FbConnection sqlConnection = null)
 {
     _statements = new FbStatementCollection();
     if (sqlConnection == null)
     {
         _sqlConnection    = new FbConnection();              // do not specify the connection string
         _connectionString = new FbConnectionStringBuilder();
     }
     else
     {
         _sqlConnection    = sqlConnection;
         _connectionString = new FbConnectionStringBuilder(sqlConnection.ConnectionString);
     }
 }
Ejemplo n.º 3
0
 public FbScript(string script)
 {
     this.results       = new FbStatementCollection();
     this.parser        = new StringParser(RemoveComments(script));
     this.parser.Tokens = new[] { ";" };
 }