You should create an abstraction on top of UL for the rest of your program
to use. This abstraction can then serialize all access to the UL database
using a semaphore. Different selects will not affect each other's row data.
If you update, insert, or delete rows, the changes will affect select row
Sybase - iAnywhere Solutions
Please only post to the newsgroup
EBFs and Whitepapers
"David Fishburn" <fishburn@spam_off_sybase.com> wrote in message
> Subject:Ultralite multithreading question
> Author:jgugliemino <email@example.com>
> << previous � next >>
> I am looking at using Ultralite to run as part of an embedded system under
> VxWorks on a PowerPC. I've just been looking at the doc so far (no coding
> yet) and came across an important point.
> I read in the SQL Anywhere doc "UltraLite applications should not be
> where multiple threads access the database simultaneously, as
> multi-threading is not supported"
> I'd like a quick clarification. Does this mean that I should wrap the
> actual execute with a semaphore, or does this mean the whole statement
> prep/execute/cursor processing sequence need to be atomic? In other
> if I have 2 threads each interested in running selects, can they do their
> setup at (possibly) the same time, sequence the executions using a
> semaphore, and then examine the results (possibly) at the same time? Or,
> will the 2nd query stomp on the cursor from the 1st query, giving me
> unpredictable results?
> David Fishburn
> Sybase - iAnywhere Solutions
> Professional Services
> Please only post to the newsgroup
> EBFs and Whitepapers