----------------------------------------------------------- New Message on cochindotnet
----------------------------------------------------------- From: SujayIsQ Message 1 in Discussion Hi (Rosh ?), Try to accomplish: I am trying to populate a set of DataTable objects (well, this is an array) from SqlDataReader() calls.The objective is simply this... There are several SQL Server stored-procedures (like sp_help, sp_tables, etc) where multiple tables are returned. According to MSDN, these results can be read in using SqlDataReader (.ExecuteReader() of SqlCommand) and used... But, I want the results to be in DataTable format for usage elsewhere - display, drill-down grids, etc. Got the idea ? Ok... Problem: So, what's the problem you ask ? Simply this... The DataReader's .Read() function returns one ROW at a time. And these are not DataRow compatible. So, what the programmer needs to do here, is to take the results of the .Read(), along with the schema returned by the [SqlDataReader].GetSchemaTable() and compose a DataRow from this. If you've lost your way, this is so that I can add it to the DataTable variable. The problem is... I am unable to successfully transit this information from the raw-data returned by .Read() and into a DataRow... Simply put, no DataRow... various types of unfathomable errors galore ! Time frame: Well, since I am making this for a production app, "asap" would be good. If anyone has working code, your contribution would be well-appreciated by reciprocal code... Thanks. WBR, Sujay. ----------------------------------------------------------- To stop getting this e-mail, or change how often it arrives, go to your E-mail Settings. http://groups.msn.com/cochindotnet/_emailsettings.msnw Need help? If you've forgotten your password, please go to Passport Member Services. http://groups.msn.com/_passportredir.msnw?ppmprop=help For other questions or feedback, go to our Contact Us page. http://groups.msn.com/contact If you do not want to receive future e-mail from this MSN group, or if you received this message by mistake, please click the "Remove" link below. On the pre-addressed e-mail message that opens, simply click "Send". Your e-mail address will be deleted from this group's mailing list. mailto:[EMAIL PROTECTED]
