Provider is not defined

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
katsumoto
Posts: 2
Joined: Tue 08 Jan 2013 12:10

Provider is not defined

Post by katsumoto » Tue 08 Jan 2013 12:27

Sup people, im having problem with this error.
I have the current scenario:

- Datamodule with TUniConnection with parameters ready for connection, im using MySQL for provider but i didnt put TMySQLUniProvider on this datamodule becouse i do not pretend to use this connection as my main connection (most of the times at least), its just a reference to connection parameters.

- Im trying to implement a thread library for database operations, so in with thread i have a TUniConnection and a TUniProvider field, when this thread is created i assign values from the original TUniConnection (the datamodule one) to my TUniConnection within the thread using something like this: FThreadConnection.Assign(FModuleConnection); after that i create manually the provider using FProvider := TMySQLUniProvider.Create();

the problem occur when i try to connect or another database operation using this connection in the thread.

i dont know if is any use but im tring to do that using the OmniThreadLibrary

i appreciate any help

CristianP
Posts: 79
Joined: Fri 07 Dec 2012 07:44
Location: Timișoara, Romania

Re: Provider is not defined

Post by CristianP » Tue 08 Jan 2013 12:45

Hi,

have you tried FThreadConnection.ProviderName := 'MySQL' before connect?

Best Regards,
Cristian Peta

AndreyZ

Re: Provider is not defined

Post by AndreyZ » Wed 09 Jan 2013 11:18

Please specify the exact error that occurs when you are trying to connect to a database in a thread.

Post Reply