dbTalk Databases Forums  

UltraLite DB v10 on Palm: how to copy?

sybase.public.sqlanywhere.ultralite sybase.public.sqlanywhere.ultralite


Discuss UltraLite DB v10 on Palm: how to copy? in the sybase.public.sqlanywhere.ultralite forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Anatoly Ivanov
 
Posts: n/a

Default UltraLite DB v10 on Palm: how to copy? - 11-18-2008 , 11:42 PM






Hello all,

How to copy clean (only structure with no data, something like template db)
Ultralite DB v10 on Palm (using C++ program written in CW 9)
over existing DB with data programmatically? In the case of embedded SQL
DB it is created automatically on start, with separate DB I have to create
new DB with all the options that were in the old DB and this is not good
for me.

Regards, Anatoly Ivanov



Reply With Quote
  #2  
Old   
Michal Seliga
 
Posts: n/a

Default Re: UltraLite DB v10 on Palm: how to copy? - 11-19-2008 , 04:33 AM






this is what i use:

create empty database on desktop

set DATABASE="DSN=..."
"%SQLANY10%\win32\ulinit" -a %DATABASE% -c "dbf=hamsfadb.pdb" -n HamiltonPub -p
HmL9 -s HamiltonPub

then this database i embed into main prc (zipeed, split to 64kb blocks and put
to resources)

when i launch application and no database is found i join resources into memory,
decompress it (using syszlibarm) and copy to storage with DmCreateDatabaseFromImage

if it sounds too difficult for you then you may omit compression/decompression,
but in my case empty database is almost 2mb big (compressed 66kb) so your
application will grow a lot

i hope it will help

Anatoly Ivanov wrote:
Quote:
Hello all,

How to copy clean (only structure with no data, something like template
db) Ultralite DB v10 on Palm (using C++ program written in CW 9) over
existing DB with data programmatically? In the case of embedded SQL DB
it is created automatically on start, with separate DB I have to create
new DB with all the options that were in the old DB and this is not good
for me.

Regards, Anatoly Ivanov



Reply With Quote
  #3  
Old   
Michal Seliga
 
Posts: n/a

Default Re: UltraLite DB v10 on Palm: how to copy? - 11-19-2008 , 04:33 AM



this is what i use:

create empty database on desktop

set DATABASE="DSN=..."
"%SQLANY10%\win32\ulinit" -a %DATABASE% -c "dbf=hamsfadb.pdb" -n HamiltonPub -p
HmL9 -s HamiltonPub

then this database i embed into main prc (zipeed, split to 64kb blocks and put
to resources)

when i launch application and no database is found i join resources into memory,
decompress it (using syszlibarm) and copy to storage with DmCreateDatabaseFromImage

if it sounds too difficult for you then you may omit compression/decompression,
but in my case empty database is almost 2mb big (compressed 66kb) so your
application will grow a lot

i hope it will help

Anatoly Ivanov wrote:
Quote:
Hello all,

How to copy clean (only structure with no data, something like template
db) Ultralite DB v10 on Palm (using C++ program written in CW 9) over
existing DB with data programmatically? In the case of embedded SQL DB
it is created automatically on start, with separate DB I have to create
new DB with all the options that were in the old DB and this is not good
for me.

Regards, Anatoly Ivanov



Reply With Quote
  #4  
Old   
Michal Seliga
 
Posts: n/a

Default Re: UltraLite DB v10 on Palm: how to copy? - 11-19-2008 , 04:33 AM



this is what i use:

create empty database on desktop

set DATABASE="DSN=..."
"%SQLANY10%\win32\ulinit" -a %DATABASE% -c "dbf=hamsfadb.pdb" -n HamiltonPub -p
HmL9 -s HamiltonPub

then this database i embed into main prc (zipeed, split to 64kb blocks and put
to resources)

when i launch application and no database is found i join resources into memory,
decompress it (using syszlibarm) and copy to storage with DmCreateDatabaseFromImage

if it sounds too difficult for you then you may omit compression/decompression,
but in my case empty database is almost 2mb big (compressed 66kb) so your
application will grow a lot

i hope it will help

Anatoly Ivanov wrote:
Quote:
Hello all,

How to copy clean (only structure with no data, something like template
db) Ultralite DB v10 on Palm (using C++ program written in CW 9) over
existing DB with data programmatically? In the case of embedded SQL DB
it is created automatically on start, with separate DB I have to create
new DB with all the options that were in the old DB and this is not good
for me.

Regards, Anatoly Ivanov



Reply With Quote
  #5  
Old   
Michal Seliga
 
Posts: n/a

Default Re: UltraLite DB v10 on Palm: how to copy? - 11-19-2008 , 04:33 AM



this is what i use:

create empty database on desktop

set DATABASE="DSN=..."
"%SQLANY10%\win32\ulinit" -a %DATABASE% -c "dbf=hamsfadb.pdb" -n HamiltonPub -p
HmL9 -s HamiltonPub

then this database i embed into main prc (zipeed, split to 64kb blocks and put
to resources)

when i launch application and no database is found i join resources into memory,
decompress it (using syszlibarm) and copy to storage with DmCreateDatabaseFromImage

if it sounds too difficult for you then you may omit compression/decompression,
but in my case empty database is almost 2mb big (compressed 66kb) so your
application will grow a lot

i hope it will help

Anatoly Ivanov wrote:
Quote:
Hello all,

How to copy clean (only structure with no data, something like template
db) Ultralite DB v10 on Palm (using C++ program written in CW 9) over
existing DB with data programmatically? In the case of embedded SQL DB
it is created automatically on start, with separate DB I have to create
new DB with all the options that were in the old DB and this is not good
for me.

Regards, Anatoly Ivanov



Reply With Quote
  #6  
Old   
Michal Seliga
 
Posts: n/a

Default Re: UltraLite DB v10 on Palm: how to copy? - 11-19-2008 , 04:33 AM



this is what i use:

create empty database on desktop

set DATABASE="DSN=..."
"%SQLANY10%\win32\ulinit" -a %DATABASE% -c "dbf=hamsfadb.pdb" -n HamiltonPub -p
HmL9 -s HamiltonPub

then this database i embed into main prc (zipeed, split to 64kb blocks and put
to resources)

when i launch application and no database is found i join resources into memory,
decompress it (using syszlibarm) and copy to storage with DmCreateDatabaseFromImage

if it sounds too difficult for you then you may omit compression/decompression,
but in my case empty database is almost 2mb big (compressed 66kb) so your
application will grow a lot

i hope it will help

Anatoly Ivanov wrote:
Quote:
Hello all,

How to copy clean (only structure with no data, something like template
db) Ultralite DB v10 on Palm (using C++ program written in CW 9) over
existing DB with data programmatically? In the case of embedded SQL DB
it is created automatically on start, with separate DB I have to create
new DB with all the options that were in the old DB and this is not good
for me.

Regards, Anatoly Ivanov



Reply With Quote
  #7  
Old   
Michal Seliga
 
Posts: n/a

Default Re: UltraLite DB v10 on Palm: how to copy? - 11-19-2008 , 04:33 AM



this is what i use:

create empty database on desktop

set DATABASE="DSN=..."
"%SQLANY10%\win32\ulinit" -a %DATABASE% -c "dbf=hamsfadb.pdb" -n HamiltonPub -p
HmL9 -s HamiltonPub

then this database i embed into main prc (zipeed, split to 64kb blocks and put
to resources)

when i launch application and no database is found i join resources into memory,
decompress it (using syszlibarm) and copy to storage with DmCreateDatabaseFromImage

if it sounds too difficult for you then you may omit compression/decompression,
but in my case empty database is almost 2mb big (compressed 66kb) so your
application will grow a lot

i hope it will help

Anatoly Ivanov wrote:
Quote:
Hello all,

How to copy clean (only structure with no data, something like template
db) Ultralite DB v10 on Palm (using C++ program written in CW 9) over
existing DB with data programmatically? In the case of embedded SQL DB
it is created automatically on start, with separate DB I have to create
new DB with all the options that were in the old DB and this is not good
for me.

Regards, Anatoly Ivanov



Reply With Quote
  #8  
Old   
Michal Seliga
 
Posts: n/a

Default Re: UltraLite DB v10 on Palm: how to copy? - 11-19-2008 , 04:33 AM



this is what i use:

create empty database on desktop

set DATABASE="DSN=..."
"%SQLANY10%\win32\ulinit" -a %DATABASE% -c "dbf=hamsfadb.pdb" -n HamiltonPub -p
HmL9 -s HamiltonPub

then this database i embed into main prc (zipeed, split to 64kb blocks and put
to resources)

when i launch application and no database is found i join resources into memory,
decompress it (using syszlibarm) and copy to storage with DmCreateDatabaseFromImage

if it sounds too difficult for you then you may omit compression/decompression,
but in my case empty database is almost 2mb big (compressed 66kb) so your
application will grow a lot

i hope it will help

Anatoly Ivanov wrote:
Quote:
Hello all,

How to copy clean (only structure with no data, something like template
db) Ultralite DB v10 on Palm (using C++ program written in CW 9) over
existing DB with data programmatically? In the case of embedded SQL DB
it is created automatically on start, with separate DB I have to create
new DB with all the options that were in the old DB and this is not good
for me.

Regards, Anatoly Ivanov



Reply With Quote
  #9  
Old   
Michal Seliga
 
Posts: n/a

Default Re: UltraLite DB v10 on Palm: how to copy? - 11-19-2008 , 04:33 AM



this is what i use:

create empty database on desktop

set DATABASE="DSN=..."
"%SQLANY10%\win32\ulinit" -a %DATABASE% -c "dbf=hamsfadb.pdb" -n HamiltonPub -p
HmL9 -s HamiltonPub

then this database i embed into main prc (zipeed, split to 64kb blocks and put
to resources)

when i launch application and no database is found i join resources into memory,
decompress it (using syszlibarm) and copy to storage with DmCreateDatabaseFromImage

if it sounds too difficult for you then you may omit compression/decompression,
but in my case empty database is almost 2mb big (compressed 66kb) so your
application will grow a lot

i hope it will help

Anatoly Ivanov wrote:
Quote:
Hello all,

How to copy clean (only structure with no data, something like template
db) Ultralite DB v10 on Palm (using C++ program written in CW 9) over
existing DB with data programmatically? In the case of embedded SQL DB
it is created automatically on start, with separate DB I have to create
new DB with all the options that were in the old DB and this is not good
for me.

Regards, Anatoly Ivanov



Reply With Quote
  #10  
Old   
Michal Seliga
 
Posts: n/a

Default Re: UltraLite DB v10 on Palm: how to copy? - 11-19-2008 , 04:33 AM



this is what i use:

create empty database on desktop

set DATABASE="DSN=..."
"%SQLANY10%\win32\ulinit" -a %DATABASE% -c "dbf=hamsfadb.pdb" -n HamiltonPub -p
HmL9 -s HamiltonPub

then this database i embed into main prc (zipeed, split to 64kb blocks and put
to resources)

when i launch application and no database is found i join resources into memory,
decompress it (using syszlibarm) and copy to storage with DmCreateDatabaseFromImage

if it sounds too difficult for you then you may omit compression/decompression,
but in my case empty database is almost 2mb big (compressed 66kb) so your
application will grow a lot

i hope it will help

Anatoly Ivanov wrote:
Quote:
Hello all,

How to copy clean (only structure with no data, something like template
db) Ultralite DB v10 on Palm (using C++ program written in CW 9) over
existing DB with data programmatically? In the case of embedded SQL DB
it is created automatically on start, with separate DB I have to create
new DB with all the options that were in the old DB and this is not good
for me.

Regards, Anatoly Ivanov



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.