[IWE] C# ODBCReader questions

Chris Rathman iwe@warhead.org.uk
Fri, 12 Jan 2007 10:43:39 -0600


I've used OleDbDataReader and SqlDataReader in the past, but I'm not 
sure of the particular type for ODBC?  I put together some notes on C# 
that might be useful (see the section on databases):

    http://www.angelfire.com/tx4/cus/notes/csharp-syntax.html

In general, I could have something like:

    ...  bunch of code to set up Command....

    OleDbDataReader Rs = Cmd.ExecuteReader();
    Rs.Read();
    while (Rs.Read())
    {
        string example = (string)Rs["Example"];
    }  

So, the answer is likely that you want to use the associative array that 
corresponds to the data reader object.

Chris.
 

Barry Roomberg wrote:
> If I do a "select *" in an ODBC connection, and then have the reader pulling 
> the data, how can I pull the assoicated field name from the reader array?
> _______________________________________________
> IWE mailing list
> IWE@warhead.org.uk
> http://lists.warhead.org.uk/mailman/listinfo/iwe
>
>