Re: VARCHAR Length
Posted by: Chris Cline
Date: November 20, 2004 03:49PM

I'm not sure how you are excuting the DataReader but here is how I get the columnSize and other attributes.

MySqlConnection mCon = new MySqlConnection( this.ConnectionString );
mCon.Open();

MySqlCommand mCmd = new MySqlCommand("Select * from " + DatabaseName + "." + TableName , mCon );

MySqlDataReader mr = mCmd.ExecuteReader();

DataTable st = mr.GetSchemaTable();

I can then do a foreach datarow dr in st.Rows and look at the "ColumnSize", "ColumnName", etc.

Options: ReplyQuote


Subject
Written By
Posted
November 19, 2004 06:53PM
Re: VARCHAR Length
November 20, 2004 03:49PM
November 21, 2004 09:21AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.