コード例 #1
0
        protected override int RunQuery(string query)
        {
            int rowcount;

            using (var cmd = OracleAdhocCommand.UsingSmartConnection(myConfig.ConnectionString)
                             .WithSql(query))
            {
                rowcount = (int)cmd.ExecuteScalar();
            }

            return(rowcount);
        }
コード例 #2
0
        protected override DataTable RunQuery(string query)
        {
            var data = new DataTable();

            using (var cmd = OracleAdhocCommand.UsingSmartConnection(_config.ConnectionString)
                             .WithSql(query))
            {
                using (var reader = cmd.ExecuteReader())
                {
                    data.Load(reader);
                }
            }

            return(data);
        }