DataSet Limitation? Part 2

G

Guest

Okay, so I'm back to the initial question. I know now how to use DataReader to pull in SqlDecimal information of a high precision.

But what about the DataSet? If I try to fill a DataAdapter, no go. "Conversion overflow"

So, is it just not possible then to use a DataSet when the Precision of a decimal column in SQL is too high?

jdn
 
G

Guest

Figured it out or at least one way. Kind of a pain

AutoGenerateColumns for DataGrid false. In code, create SqlTable, create and define SqlColumns, add them to SqlTable. Use a SqlReader to get the data from the DB. While SqlReader.Read(), manually pull in the values into a new SqlRow, and so here, you can do a SqlDataReader.GetSqlDecimal() to avoid the "Conversion Overflow" error. Add SqlRow to SqlTable. Once all rows are read, then add SqlTable to a DataSet

Simple <blah>

jd

----- jdn wrote: ----

Okay, so I'm back to the initial question. I know now how to use DataReader to pull in SqlDecimal information of a high precision

But what about the DataSet? If I try to fill a DataAdapter, no go. "Conversion overflow

So, is it just not possible then to use a DataSet when the Precision of a decimal column in SQL is too high

jdn
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top