using System.Data;
using System.Data.OleDb;
public static List<string[]> select_list(string path, string sql)
{
string connstr = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + path;
OleDbConnection aConnection = new OleDbConnection(connstr);
OleDbCommand aCommand = new OleDbCommand(sql, aConnection);
aConnection.Open();
OleDbDataReader aReader = aCommand.ExecuteReader();
List<string[]> list1 = new List<string[]>();
while (aReader.Read())
{
int q = aReader.FieldCount;
string[] li_str1 = new string[q];
for (int x = 0; x < q; x++)
{
li_str1[x] = aReader[x].ToString();
}
list1.Add(li_str1);
}
aReader.Close();
aConnection.Close();
return list1;
}