[V4RB2.0.2fc]:MAC:how do I create Database?

Serge sun2 at public.kherson.ua
Mon Apr 11 09:04:46 CDT 2005


Hi Dimitris,


> Currently I am creating a REALDatabase using these commands:
> 
> dim db as REALDatabase
> dim f as folderitem
> 
>     db=New REALdatabase
>     db.databaseFile=f
>     If db.CreateDatabaseFile then
>       //proceed with database operations...
> 
> 
> and I am applying on db all of REALBasics Database Class methods.

 
> When I do
> dim db as Vdatabase
> db=new Vdatabase

> the db has different methods than these of REALDatabase

> How could I use my REALDatabase application and migrate it to valentina?

You should do next:

Open Event
  // First of all we must init Valentina engine
  Valentina.Init(8 * 1024 * 1024)
  

Your Method:
  Dim db as VRBDataBase
  
  dbFile = GetFolderItem(filename)
  db = new VRBDataBase
  db.databaseFile = dbFile
  
  if db.CreateDatabaseFile then

    .............................
    rest of your code
    .............................

Close event
  // When we finish work with Valentina engine we should shutdown it.
  Valentina.Shutdown

  

In attachment you can see the example "Database Access"
(It will be in the example folder of valentina in the next build).


-- 
Best regards,
Serge



More information about the Valentina mailing list