Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
405
UltraDataSource
posted

hi

i have an object of a class of mine that i serialize and save in database. to serialize i use binnary formatter and serialize function.

one of the properties of the object in an UltraDataSource. the problem is that when serializing the object i get exception

it some how cant serialize the UltraDataSource although the ultraDataSource has function save as binary.

is there a way to serialize the ultra data source with the binary formatter ans not the ultra data source save as binary?

because i want to serialize the complete object and not serialize the object without the datasource and the datasource - so i can save all data in one column in database and not 2,

thanks!

the problem is that i

  • 469350
    Suggested Answer
    Offline posted

    Hi,

    The Save and load methods on the UltraDataSource save the data structure and possibly the data. They don't save the UltraDataSource object itself. The UltraDataSource component class is not run-time serializable, so I don't think what you are trying to do will work.

    I think what you would have to do is use a TypeConverter attribute on your UltraDataSource property and hook it up yourself in code to either an existing UltraDataSource or else create a new one and load the data and structure into it from a file.