[IronPython] Array of Objects in IronPython

Bernd Viehmann bernd.viehmann at ascom-ac.de
Tue Mar 3 17:03:51 CET 2009


I have a question regarding a typed array.

Basically I want to use IronPython and ADO.NET to get some data from a 
stored procedure. My first idea was to use a SQL DataReader to get all 
the lines of my result table into an array. Csharp way looks like this:

*ArrayList rowList = new ArrayList();*
SqlDataReader reader = storedProcCommand.ExecuteReader();
while (reader.Read())
   *object[] values = new object[reader.FieldCount];*

My problem is to generate an array of type object to feed 
*reader.GetValues(values) with it. Any ideas how this can be done?

Kind regards from Germany



More information about the Ironpython-users mailing list