Home > Archive > SQL Anywhere ultralite > December 2005 > Using Global Database Identifier with PocketBuilder 2.0.3 and Ultralite DB









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Using Global Database Identifier with PocketBuilder 2.0.3 and Ultralite DB
Andrés Valor

2005-12-16, 11:23 am

Hi!

I'm developing a project on PocketBuilder 2.0.3 (864), using ASA 9.0.1
(1922). On PDA
devices I've deployed some Ultralite DB which I can synchronize succesfuly
with a consolidated database.

I've a problem maintaining primary keys on synchronization. I've learned
about 'Global Database Identifier' and I'm trying to use it in order to
solve this problem.

When I try to assign the property GLOBAL_DATABASE_ID in the UltraLite DB
(used by Global Database Identifier to 'build' an unique identifier value) I
use these instructions in PocketBuilder:

ls_sql='SET OPTION PUBLIC.GLOBAL_DATABASE_ID = '+string(li_dbid)

EXECUTE IMMEDIATE :ls_sql;

When the program reaches to the EXECUTE instruction, it crashes PKBuilder.
Is it a PocketBuilder bug? Am I doing something wrong?
Can anyone help me with this? Thank you

PD: Sorry for my poor english :)




Shuchit

2005-12-17, 3:23 am

"Andrés Valor" <avalor@grupotec.es> wrote in news:43a2f4da$1@foru
ms-1-dub:

>
> When I try to assign the property GLOBAL_DATABASE_ID in the UltraLite DB
> (used by Global Database Identifier to 'build' an unique identifier
> value) I use these instructions in PocketBuilder:
>
> ls_sql='SET OPTION PUBLIC.GLOBAL_DATABASE_ID = '+string(li_dbid)
>
> EXECUTE IMMEDIATE :ls_sql;
>
> When the program reaches to the EXECUTE instruction, it crashes
> PKBuilder. Is it a PocketBuilder bug? Am I doing something wrong?
> Can anyone help me with this? Thank you
>
> PD: Sorry for my poor english :)
>
>


You cannot execute "Set option" statements with UltraLite. To set the global
database id in ultralite. I am not completely sure which interface
PocketBuilder uses, but there should be either a setDatabaseID function or a
DatabaseId property on the ULConnection object.

Shuchit
Andrés Valor

2005-12-19, 3:23 am

What is the ULConnection object? I'm actually using this sintax to connect
with the UL database:

SQLCA.DBMS = "UL9"
SQLCA.AutoCommit = False
SQLCA.DBParm =
"ConnectString='DBF=" +GetCurrentDirectory
()+"\pruebaul. udb;UID=prueba;PWD=p
rueba'"

connect using sqlca;

Am I doing something wrong?

"Shuchit" <me@privacy.net> escribió en el mensaje
news:Xns972F3E99FEA9
svelkarprivacynet@12
7.0.0.1...
> "Andrés Valor" <avalor@grupotec.es> wrote in news:43a2f4da$1@foru
ms-1-dub:
>
>
> You cannot execute "Set option" statements with UltraLite. To set the
> global
> database id in ultralite. I am not completely sure which interface
> PocketBuilder uses, but there should be either a setDatabaseID function or
> a
> DatabaseId property on the ULConnection object.
>
> Shuchit



Shuchit

2005-12-21, 7:23 am

"Andrés Valor" <avalor@grupotec.es> wrote in news:43a67222@forums
-1-dub:

>
> What is the ULConnection object? I'm actually using this sintax to
> connect with the UL database:
>
> SQLCA.DBMS = "UL9"
> SQLCA.AutoCommit = False
> SQLCA.DBParm =
> "ConnectString='DBF=" +GetCurrentDirectory
()+"\pruebaul.udb;UID=prueba;PWD
> =prueba'"
>
> connect using sqlca;
>
> Am I doing something wrong?


Since noone else has responded to you, I will take a shot.

I am not very familiar with PocketBuilder. However, some research shows that
it might not actually expose the underlying UltraLite objects.

How did you create the UltraLite database ? If you are using ulcreate, then
you can specify the global database id using the -g switch.

Shuchit
Andrés Valor

2005-12-22, 3:23 am

Thanks for helping me! :D

I create the database using the PocketBuilder utility under the DataBase
profile menu. (Exactly: DataBase Profile -> UL9 Database -> Utilities ->
Create Ultralite database)

I don't know any other way to create it. I've looked for the 'ulcreate'
command you talk about, but I didn't found it. :S (ulgen is the most similar
command I've found, but it doesn't seem to be the right command)

Once again, thank you for your time! :)



"Shuchit" <me@privacy.net> escribió en el mensaje
news:Xns9733420D5476
Fsvelkarprivacynet@1
27.0.0.1...
> "Andrés Valor" <avalor@grupotec.es> wrote in news:43a67222@forums
-1-dub:
>
>
> Since noone else has responded to you, I will take a shot.
>
> I am not very familiar with PocketBuilder. However, some research shows
> that
> it might not actually expose the underlying UltraLite objects.
>
> How did you create the UltraLite database ? If you are using ulcreate,
> then
> you can specify the global database id using the -g switch.
>
> Shuchit



Andrés Valor

2005-12-22, 1:23 pm

OK. I've found the ulcreate utility on ASA 9.0.2. I think this can be very
useful for me.

Thank you very much!!!!!! Bye!


"Shuchit" <me@privacy.net> escribió en el mensaje
news:Xns9733420D5476
Fsvelkarprivacynet@1
27.0.0.1...
> "Andrés Valor" <avalor@grupotec.es> wrote in news:43a67222@forums
-1-dub:
>
>
> Since noone else has responded to you, I will take a shot.
>
> I am not very familiar with PocketBuilder. However, some research shows
> that
> it might not actually expose the underlying UltraLite objects.
>
> How did you create the UltraLite database ? If you are using ulcreate,
> then
> you can specify the global database id using the -g switch.
>
> Shuchit



Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com