Home > Archive > SQL Anywhere ultralite > September 2005 > ApiFiles-UltraliteDB-









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 ApiFiles-UltraliteDB-
Srini

2005-09-15, 3:23 am

Hello!

This is doubt regarding custDB kind of applications.

I have genrated 3 files (.cpp,.h,.hpp) using
ulgen(Publication:cu
stapi,project:custap
i)

In the api files i have functions such as "SetCust" .

In UI main file i access them as DemoDB->SetCust(s).

This is stored in a variable m_cust.

My question is ."How is this variable accessed by the
ultralite DB,"?

"Where is the connectivity between custapi.cpp and the
ultralite DB"?

In another similar appilication i built, the new record is
overwriting the old records.what kind of logic should i be
using to avoid this?

Can u suggest a more simpler example than custDB?
My idea is to simple add names into a Ultralite DB table
and retireve them.


regards,
Srini
Greg Fenton

2005-09-15, 8:23 pm

Srini wrote:
>
> "Where is the connectivity between custapi.cpp and the
> ultralite DB"?
>


Since you are using the static C++ API, the "ultralite DB" is actually
generated by ulgen into those generated files. Under the static APIs,
you get a custom database "engine" generated by the SQL statements and
the schema of your reference database.

> In another similar appilication i built, the new record is
> overwriting the old records.what kind of logic should i be
> using to avoid this?


You'd have to show us some code as to how the new record is getting into
the database. Are you using the table API or a statement object?

> Can u suggest a more simpler example than custDB?
> My idea is to simple add names into a Ultralite DB table
> and retireve them.


You might try downloading the ULFoundation project from Codexchange:

http://codexchange.sybase.com/

This is a project developed by our team that contains a single table and
is written for many APIs, many languages, and many platforms. The idea
is to use ULFoundation as the start of a learning project:

- download ULFoundation
- compile, run, synchronize
- add a new feature (a second table, improve UI, etc...), compile and
run again.

Hope this helps,
greg.fenton
--
Greg Fenton
Consultant, Solution Services, iAnywhere Solutions
--------
Visit the iAnywhere Solutions Developer Community
Whitepapers, TechDocs, Downloads
http://www.ianywhere.com/developer/
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