tags:

views:

359

answers:

2

Hi.

I have data sets with schema defined from xml schemas. Scale and Precision are in the XML schemas, but I don't seem to be able to pull them from the columns of the data tables in the data set. I'm writing the data out to ESRI shape files and need the scale and precision to define the types for the columns. I saw a method for getting scale and precision from the data, but my data doesn't necessarily have values in the max range of scale and precision from the xml files.

So is there a way to pull precision and scale from the DataSet?

Thanks for you help.

+1  A: 

DataSet.Tables["TableName"].Columns["ColumnName"].ExtendedPreoprties["PropertyName"].ToString().

If you're saying that the xml file doesn't have the scale and precision defined, well, then, you're hosed.

Robert C. Barth
A: 

Thanks for the answer.

I tried that, but ExtendedProperties is empty for anything other than string columns.

The scale and precision are in the xml schemas. I've triple checked that.

I'm setting the schema for my dataset with myStreamReader = new StreamReader(strSchema); myXmlDoc.DataSet.ReadXmlSchema(myStreamReader); dsOut = myXmlDoc.DataSet;

I then fill some of the colums from a dbIV file, fill one or more user selected columns with my code, and then write out a new dbIV file with all the columns with data. Which is where I'm getting stopped.