CCeDBDatabase with mounted volume

CCeDBDatabase with mounted volume

Post by Ken » Tue, 04 Dec 2001 19:30:50



Hi embedded.vczers,

Is it possible to run CCeDBDatabase on a volume mounted with CeMountDBVol()?
Or is there a way to safe the CCEDBDatabase on a location other than the
"\database" folder?

Thanks,

 
 
 

CCeDBDatabase with mounted volume

Post by Glenn T » Fri, 21 Dec 2001 21:51:36


Yes, sort of... you need to subclass CCeDBDatabase and
override the methods like Open and SetInfo/GetInfo to use
the Ex calls ( CeOpenDatabase in the classes Open method
should be replaced with CeOpenDatabaseEx, the first
parameter is the handle you get back from CeMountDBVol )

You can then put the datastore where ever you'd like and
name it however you'd like.

There are several other methods you have to override
too... & don't forget to add an Unmount method for your
data store.

Good luck & happy holidays !

Glenn

Quote:>-----Original Message-----
>Hi embedded.vczers,

>Is it possible to run CCeDBDatabase on a volume mounted

with CeMountDBVol()?
Quote:>Or is there a way to safe the CCEDBDatabase on a location
other than the
>"\database" folder?

>Thanks,

>.


 
 
 

CCeDBDatabase with mounted volume

Post by Ken » Sat, 29 Dec 2001 19:28:01


Hi Glenn,

Thanks for your input. I had initially wanted to prepare a CE database class
and was halfway through preparing it. Then I tried overloadding the create
and open methods of CCeDBDatabase. As I went along, it seems like a rewrite
of all the methods would be necessary. That would be so close to rewriting
the class running on the Ex function calls. There is no way to run both the
ex and non-ex functions together rite?

Ken


Quote:> Yes, sort of... you need to subclass CCeDBDatabase and
> override the methods like Open and SetInfo/GetInfo to use
> the Ex calls ( CeOpenDatabase in the classes Open method
> should be replaced with CeOpenDatabaseEx, the first
> parameter is the handle you get back from CeMountDBVol )

> You can then put the datastore where ever you'd like and
> name it however you'd like.

> There are several other methods you have to override
> too... & don't forget to add an Unmount method for your
> data store.

> Good luck & happy holidays !

> Glenn

> >-----Original Message-----
> >Hi embedded.vczers,

> >Is it possible to run CCeDBDatabase on a volume mounted
> with CeMountDBVol()?
> >Or is there a way to safe the CCEDBDatabase on a location
> other than the
> >"\database" folder?

> >Thanks,

> >.