[IronPython] Array of Objects in IronPython
Vernon Cole
vernondcole at gmail.com
Wed Mar 4 16:19:39 CET 2009
or you can use a python standard dbapi to get to your SQL data.
http://adodbapi.sourceforge.net
On Tue, Mar 3, 2009 at 9:07 AM, Dody Gunawinata <empirebuilder at gmail.com>
wrote:
> values = System.Array.CreateInstance(System.Object, reader.FieldCount)
>
>
> On Tue, Mar 3, 2009 at 6:03 PM, Bernd Viehmann
> <bernd.viehmann at ascom-ac.de> wrote:
>> Hi,
>>
>> 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];*
>> *reader.GetValues(values);*
>> *rowList.Add(values);*
>> }
>>
>> 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
>>
>> Bernd
>>
>> *
>> _______________________________________________
>> Users mailing list
>> Users at lists.ironpython.com
>> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>>
>
>
>
> --
> nomadlife.org
> _______________________________________________
> Users mailing list
> Users at lists.ironpython.com
> http://lists.ironpython.com/listinfo.cgi/users-ironpython.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ironpython-users/attachments/20090304/7090641f/attachment.html>
More information about the Ironpython-users
mailing list