I've got a variable, which is global: CDaoDatabase db;
I've got a function - it uses this variable.
I have a thread, which calls this function, which uses variable <db>.
It gives me an access violation when this function is getting called by thread(when I do db.Execute(SQL)), but it's not, when it's getting called by the program, which started the thread.
Can you help me, I need to use this variable - <db> when the function is been called from the thread. Why it dives me an access violation ?