If I develop a set of functions to implement a new data structure (http://www.powerbasic.com/support/pbforums/showpost.php?p=315333&postcount=13) inside an SQLiteningProcs DLL, would setting the scope for the underlying base data as THREADED ensure that each connection to the database had it's own persistent copy of the data (persistent through numerous calls to various functions in the DLL), or is each function call to the SQLiteningProcs DLL being handled in a unique thread? Or are all function calls to the SQLiteningProcs DLL being handled in a single thread?
Each connection at the server runs as a separate single thread. This
means that all the commands as well as your SQLiteningProcs run in the
same unique thread for that connection. So if two clients are connected
there are two threads running.
Yes, using THREADED shared variables(globals) rather than GLOBAL ones
would seem to be the safe way to share date among several functions
within a SQLiteningProc running in a thread.
I have not personally tested this concept so let us know how it works.
Excellent. I did a simple test and it appears to be working as described. Each instance of the client calling the proc has it's own persistent copy of the data.