Jump to content
dormky

How can I prevent TMyQuery from opening a new connection ?

Recommended Posts

query := TMyQuery.Create(nil);
query.Connection := conn;
query.SQL.Text := 'SELECT * FROM data';
query.Execute();

Every time I do something like this, a new connection to the MySQL server is established. How can I make it use the already-opened 'conn' connection ?

Thanks 🙂

Share this post


Link to post

MySQL can only have one running/open query per connection.  What you are seeing is normal for MySQL. 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×