StrataFrame Forum
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      



Registry Type DataExpand / Collapse
Author
Message
Posted 08/21/2007 11:47:23 AM
StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame User

Group: StrataFrame Users
Last Login: Today @ 12:38:37 PM
Posts: 308, Visits: 1,229
I need to be able to store registry type data in the database instead of the registry (Form location/size, user preferences, etc...) so I need to be able to store all types of data in one field in a table. I assume I use variant datatype for this in the toolkit. (Let me know if I should be using something else).

When I map my business object, the field I created as variant has been changed to System.xml.XmlReader.  Is this correct?

Is this the best way to handle storing this type of data.

Thanks

Tim

Post #10970
Posted 08/21/2007 2:03:19 PM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Today @ 4:17:19 AM
Posts: 4,379, Visits: 4,420
When I map my business object, the field I created as variant has been changed to System.xml.XmlReader.  Is this correct?

It really depends on how you plan to store the registry data.  How are you retrieving it and how do you plan to restore it?  More than likely a VarChar field may be all you need if you pull out the text registry entry.  This would be the same code that you see when you export a registry entry to a .REG file.

Post #10973
Posted 08/21/2007 2:29:47 PM
StrataFrame User

StrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame UserStrataFrame User

Group: StrataFrame Users
Last Login: Today @ 12:38:37 PM
Posts: 308, Visits: 1,229
I was originally thinking about storing some object properties, like the splitter distance on the ThemedSplitContainer , but I could probably get away with storing each property value that I need in a varchar field. I didn't know if I could store the object itself and then recall the stored object properties when required.
Post #10976
Posted 08/21/2007 4:00:25 PM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Today @ 4:17:19 AM
Posts: 4,379, Visits: 4,420
Here is a suggestion and what we do.  Create a custom class that has all of the properties that you want.  Then create a table that has a item type (integer / enum) and a data (VarBinary) field.  The reason you would create an item type field is so you can create as many different classes as you want.  Once you have the class created, you can serialize to the table to save the state, then when you bring it back out it is already a class with the properties that you need.  It makes coding much easier and this is a great place to use serialization to save off states.
Post #10980
« Prev Topic | Next Topic »


Reading This TopicExpand / Collapse
Active Users: 1 (1 guest, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Ben Chase, Trent L. Taylor, Steve L. Taylor

PermissionsExpand / Collapse

All times are GMT -6:00, Time now is 6:46pm

Powered by InstantForum.NET v4.1.4 © 2008
Execution: 0.047. 13 queries. Compression Enabled.
Site Map - Home - My Account - Forum - About Us - Contact Us - Try It - Buy It

Microsoft, Visual Studio, and the Visual Studio logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.