danielgee 0 Newbie Poster

I'm using a thread in my function to connect to the DB.
How do I tell when the thread is finished so that I can continue with the next part of the code.
Also, must you terminate a thread or will it terminate on its own after the code has been run?

EG:
tmpSQL = "SELECT firstname FROM names"
Start_Execute_Thread_Function()
***Only continue to the next line when the Thread has finished***
If RecordSet.HasRows then

End If

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.