Hi
I want to fetch results from a given table (in this case using MySql) and put them in a array or arrayList or List<> (whatever works better). The thing is that this must be made dynamically. The idea is something like this:
aResult = functionsMysql.getArray(query);
class functionsMysql
{
function getArray (string query)
{
...connect and execute query
while(Reader.Read())
{
...fill...
}
}
}
I already have the connection working and the query is executed but i don´t have any idea how to put the results into the array, because the result doesn't a fixed number of rows or fields.
The array(or whatever...) has to be something like:
aResult[RowNumber, FieldName, Row.Field.Value]
is this possible?
Needless to say I'm a C# beginner and English isn't my language