hi,
Can anyone explain to me how i can create a database in the databases folder
on the pocket pc? i know how to create xml files or even sql server ce
databases on the PPC but i've notice that there is a databases folder that i
can see from my desktop on the PPC but i have no idea how to access or
create files in that directory can anyone guide me on this.

Thank you very much

Re: newbie question on data storage for PPC windows mobile 2003 by Doug

Doug
Sun Jan 04 21:39:00 CST 2004

Hi John,

Look up CCeDBDatabase and allied classes in eVC help. The databases folder
is not a real folder. Each 'database' is really a table.

Cheers

Doug Forster

"John Timote" <johnnospam@nospamok.com> wrote in message
news:%23LNcpUN0DHA.2676@tk2msftngp13.phx.gbl...
> hi,
> Can anyone explain to me how i can create a database in the databases
folder
> on the pocket pc? i know how to create xml files or even sql server ce
> databases on the PPC but i've notice that there is a databases folder that
i
> can see from my desktop on the PPC but i have no idea how to access or
> create files in that directory can anyone guide me on this.
>
> Thank you very much
>
>



Re: newbie question on data storage for PPC windows mobile 2003 by paulnewton44

paulnewton44
Mon Jan 05 07:41:48 CST 2004

This is what I do to create a local Db in eVB...

Public Function CreateNewDb() As Boolean

' Ensure that you have Microsoft CE ADO Control 3.0 selected in Project->References
' Note: You will need to check which version of ADO you have, it might be 3.1!

Dim ADOCEConnection As ADOCE.Connection

Const ADOCE_CLASS_CONNECTION = "ADOCE.Connection.3.0"
Const DB_NAME = "\YourDbPath\YourDbName.cdb"

CreateNewDb = False

Set ADOCEConnection = CreateObject(ADOCE_CLASS_CONNECTION)

ADOCEConnection.Open

' create the db
ADOCEConnection.Execute "CREATE DATABASE '" & DB_NAME & "'"

If Err.Number = 0 Then CreateNewDb = True

' The db should now be created, you will now have to add the required tables!


End Function

This code is taken from a working application, although I have not tested this
code snippet in isolation.


Hope this helps


Paul Newton



"John Timote" <johnnospam@nospamok.com> wrote in message news:<#LNcpUN0DHA.2676@tk2msftngp13.phx.gbl>...
> hi,
> Can anyone explain to me how i can create a database in the databases folder
> on the pocket pc? i know how to create xml files or even sql server ce
> databases on the PPC but i've notice that there is a databases folder that i
> can see from my desktop on the PPC but i have no idea how to access or
> create files in that directory can anyone guide me on this.
>
> Thank you very much