I made a small app that connects to a mysql db using dbx. It works ok with my local mysql server, but it's supposed to work with a remote server.
Connecting to the remote server takes a few seconds, which freezes the app.
So my question is, how can I put the connection code in a different thread?
I'll have to pass that connection to the main thread somehow, so that the dbgrid I have on the main form works.
I read that db stuff working in a different thread should have their own connections. So I'm not sure how to do what I want.
Any ideas? Anything to read about working with remote servers?
Thanks.
Edit: The components I'm using on the form are: TSQLConnection -> TSimpleDataSet > TDataSource > TDBGrid.