How can I use the DBMS correctly in this case OR Is it necessary to use???

Login to reply to this topic.
Tue, 2008-03-18 08:19
Joined: 2008-03-18
Forum posts: 23


Hi,everyone ! Recently, i have a project that needs to port a j2me network game to symbian c++ ; when reaching to the RmsOperate(j2me store method) , i cannot decide how to porting this class to symbian c++.
When i reference to the SDK , I find DBMS can do some job like that, yet i donn't know is it necessary ???

My data which needs to been stored in the local place is just like that :
------------------------------------------------------------------------------------------------------------------
HBufC* m_name;
HBufC* m_pass;
CPtrCArray *m_mails; // max_mail_num = 50
CPtrCArray *m_msgs; //max_msg_num =100
CPtrCArray *m_newbill;
//
class MailBox
{
public:
TInt m_id;
HBufC* m_nick;
TInt m_head;
TInt m_rid;
TBool m_read;
CPtrCArray* m_msg;
}
//
class MessageBox
{
public:
TInt m_id;
HBufC* m_msg;
TBool m_read;
TInt8 m_type;
}
--------------------------------------------------------------------------------------
How can i use the column in DBMS to store a data type like "MailBox" , I have no idea about that ?
Is it necessary to use the DBMS in this case ?


Tue, 2008-03-18 08:30
Joined: 2005-11-20
Forum posts: 1242
RFileWriteStream and RFileReadStream

You could use the database, but I think for structures like this it is much simpler to "externalize" and "internalize" them with the help of the RFileWriteStream and RFileReadStream classes. Especially check the "<<" and ">>" operators there which make it very simple to read and write things.


René Brunner

Tue, 2008-03-18 09:25
Joined: 2008-03-18
Forum posts: 23
Re: René Brunner


Just check the SDK, I can design my class as a store-aware class -defines the ExternalizeL()/InternalizeL() member function,Right ??
this facility is very useful ..

Thanks ,René Brunner .

  • Login to reply to this topic.