Beispiel #1
0
        public int CreateTable( )
        {
            string     tab = t.CreateTableScript();
            SqlCommand cmd = new SqlCommand(tab, DB.DBCon);

            return(cmd.ExecuteNonQuery());
        }
        public void CreateTable( )
        {
            string     sqlQ = t.CreateTableScript();
            SqlCommand cmd  = Db.DBCon.CreateCommand();

            cmd.CommandText = sqlQ;
            Console.WriteLine("Sql=" + sqlQ);
            Console.WriteLine("Table Creation is ", cmd.ExecuteNonQuery());
        }
 public ExpensesDB( )
 {
     tableDetails          = new TableClass(typeof(BankDetails));
     DetailTableName       = tableDetails.ClassName;
     InsertDetailsSqlQuery = tableDetails.CreateInsertScript();
     if (!IsTableExist(DetailTableName))
     {
         CreateTable(tableDetails.CreateTableScript());
     }
 }
Beispiel #4
0
        public int CreateTable( )
        {
            SqlCommand cmd = new SqlCommand(table.CreateTableScript(), Db.DBCon);

            return(cmd.ExecuteNonQuery());
        }