Welcome to the SQLitening support forums!
Started by Bern Ertl, September 20, 2012, 05:23:19 PM
#Compile Exe#Include "SQLitening.Inc"Thread Function T1(byval rlParm as Long) as Long slRunProc "BEntry2", 0, 0, "", "", "" ?"Thread DoneEnd FunctionFunction PbMain() Local llA as Long slConnect thread create T1(0) to llA ?"Main DoneEnd Function
QuoteI see now that each thread within an application must open a given database individually.
Quote3. All numeric database handle. This is the formatted value returned from slGetHandle or is the first parm received in a database Proc. Using this in remote Procs allows for a database handle to be inherited by SQLitening.Dll. A flag will be set so this inherited database handle can not be closed.
QuoteI thought threads worked like window callback functions, but they are apparently quite different.
Quote from: Fred Meier on September 21, 2012, 01:08:32 PM... There is a way to inherit the database handle (see slOpen doc below) but I have done some testingand found a bug when using across threads in remote mode, I will fix in next release. ...
THREAD FUNCTION MyThread( BYVAL hData AS DWORD) AS DWORD LOCAL pMyUDT AS MyUDT PTR pMyUDT = hData slOpen FORMAT$( @pMyUDT.hDB, 18)...END FUNCTION
QuoteI do not need to use slClose in the thread function, correct?
QuoteIf I'm in remote mode, can I close the connection in the thread function without closing the database?