public static void TestAddTable() { string sql = "create table templjqfortest( name varchar2(100),name1 varchar2(100),createtime date,supertiem timestamp)"; string connStr = "Data Source=kfhzbdc200;User ID=sjgj;Password=sjgj"; IDbAccess db = IDbFactory.CreateIDb(connStr, "oracle"); if (!db.JudgeTableOrViewExist("templjqfortest")) { Console.WriteLine("插入行:" + (db.ExecuteSql(sql) > 0?true:false).ToString()); } }
public static void TestdeleteTable() { string connStr = "Data Source=kfhzbdc200;User ID=sjgj;Password=sjgj"; IDbAccess db = IDbFactory.CreateIDb(connStr, "oracle"); if (db.JudgeTableOrViewExist("templjqfortest")) { string sql = "drop table templjqfortest"; Console.WriteLine(":" + db.ExecuteSql(sql)); } }
public static void Test1() { iDb.ExecuteSql(@"create table "); }