Exemple #1
0
 /// <summary>
 /// 批量执行 SQL 语句,返回受影响的行数
 /// </summary>
 /// <param name="sql"></param>
 /// <returns></returns>
 public static int RunSQL(List <string> sqls)
 {
     if ("odbc".Equals(dbType))
     {
         return(DBAccessOfOdbc.RunSQL(sqls));
     }
     else if ("oledb".Equals(dbType))
     {
         return(DBAccessOfOleDb.RunSQL(sqls));
     }
     else if ("oracle9i".Equals(dbType))
     {
         return(DBAccessOfOracle9i.RunSQL(sqls));
     }
     else if ("sql".Equals(dbType))
     {
         return(DBAccessOfSql.RunSQL(sqls));
     }
     else if ("sqlite".Equals(dbType))
     {
         return(DBAccessOfSQLite.RunSQL(sqls));
     }
     else
     {
         return(0);
     }
 }