public DataTable GetFields(string dbName, string tbName, string sql) { sql = string.Format(sql, tbName, dbName); DataTable dt = MsSqlHelper.ExecuteDataTable(sql); return(dt); }
private void InitMainForm() { GetMsSqlDBCS(); MsSqlHelper.ConnectionString(dbcs); //获取数据库连接串 GetSqlSentence(); //获取读取数据库,表,字段的SQL语句 }
public DataTable GetDatabases(string sql) { return(MsSqlHelper.ExecuteDataTable(sql)); }