|01-14-2006, 01:35 AM||#1|
Join Date: Mar 2003
I have a few questions concerning database implementation:
1) I am in the process of reimplementing my backend database using Microsoft Access XP. Using code generated by Microsoft Visual C++ wizard as a guide, I have created my own Recordset class for each table by inheriting members of the CRecordset class. For any given string such as m_AREA_NAME, this wizard stores data of the type CString. This wizard would initialize this string to the following:
m_AREA_NAME = L"";
What is this "L" and what does it do exactly? When I right-clicked on it and clicked "go to definition", it brought up the following information:
2) By using dynasets, I can override DoFieldExchange to enable RFX (Record Field Exchange). The nice thing about this capability is when I open the recordset, all the data members are automatically bound the values in the database. I never have to call GetFieldValue. Currently, I have all these records opening as dynasets when the mud itself initializes the world data. These records close when the mud destructors are called. As I add more and more records, how bad would leaving these records open slow down the mud if at all? The reasoning behind me wanting to leave them open has to do with updating the member variables. As values change, I can call the SetFieldDirty member function. When I wish to save world data, all I have to do is call the Edit and Update functions without having to worry about the Open procedure. If a field is dirty, then it is updated. I am assuming once this open function is successfully called, the recordset will remain open until it goes out of scope or the close function is called?
3) Since some of the code was automatically generated, I initially overlooked a flaw in it concerning the RFX_Text function. It turned out that since my room descriptions are saved as memo fields in the database, an additional paramater had to be set that declared what the maximum size of the field must be. For a Microsoft Access XP database, is there a way to declare a validation rule for memo fields that would state what the maximum length would be? I realize that I could create forms if I wanted to edit the database directly. Hopefully, I will have online creation setup soon enough.
Thanks to all those who respond. As always, any help will be greatly appreciated
|Backend Database - Similar Threads|
|Thread||Thread Starter||Forum||Replies||Last Post|
|Database of jerks?||SirTank||MUD Administration||14||03-10-2006 03:06 PM|
|MU* Database||diaskeaus||Advertising for Staff||2||03-01-2005 06:01 PM|