Page 1 of 1

File not found: MyConnectionString.dcu

Posted: Fri 26 Dec 2014 00:55
by MarlonB
Hi all,

At work we use UniDAC Pro, so I decided to use UniDAC for my hobby MySQL project as well. After trying out the trial version for 30 days, I settled for the free Express Edition, but now I'm faced with a problem (my code no longer compiles).

Here's a quick section of my Delphi code, I'm trying to access a MySQL DB on localhost.

Code: Select all

  prov := TMySQLUniProvider.Create(nil);
  conn := TUniConnection.Create(nil);
  conn.ProviderName := prov.GetProviderName;
Compiling my code gives the error "File not found: MyConnectionString.dcu", probably because of the MySQLUniProvider being used.

Commenting out the provider bits (I read in the charts the Express edition doesn't work with providers), I can get it to compile, but it doesn't work - if I change the prov.getProviderName with a string "MySQL", I get the following error:

Code: Select all

MySQL provider is not registered. You should add the MySQLUniProvider unit to the uses clause of any unit in your project or place the TMySQLUniProvider component on the form.
So either there was something missing during install (the specified MyConnectionString unit), or (much, much more likely :) ) I'm trying to connect in an incorrect way.

Can anyone point me in the right direction please?

Thanks!

Marlon

Re: File not found: MyConnectionString.dcu

Posted: Fri 26 Dec 2014 09:46
by ViktorV
UniDAC Express Edition includes only basic components and does not include database server providers. You should either install MyDAC, which contains the required provider, or use Standard or Professional Editions of UniDAC, that include all providers.

Re: File not found: MyConnectionString.dcu

Posted: Fri 26 Dec 2014 11:42
by MarlonB
ViktorV wrote:UniDAC Express Edition includes only basic components and does not include database server providers. You should either install MyDAC, which contains the required provider, or use Standard or Professional Editions of UniDAC, that include all providers.
Thank you for your reply, Viktor!

There is no free version of MyDac however, I'd like to stick with the free version of UniDac.

Is it possible to connect to MySQL with the Express Edition, and do you perhaps have a sample snippet nearby?

Thanks!

Marlon

Re: File not found: MyConnectionString.dcu

Posted: Fri 26 Dec 2014 12:56
by ViktorV
As we wrote above, you can connect to MySQL server using UniDAC Express Edition only having installed MyDAC. You can download MyDAC Trial Edition via http://www.devart.com/mydac/download.html

Re: File not found: MyConnectionString.dcu

Posted: Fri 26 Dec 2014 13:37
by MarlonB
ViktorV wrote:As we wrote above, you can connect to MySQL server using UniDAC Express Edition only having installed MyDAC. You can download MyDAC Trial Edition via http://www.devart.com/mydac/download.html
I understand - but since there is no free edition of MyDAC, am I correct in stating that there is no completely free way to connect and work with MySQL using the Express Edition?

After installing the trial, I'll be faced with the same situation in 60 days, and because of the nature of this project (a free hobby project), I can't buy the standard edition, so I'll have to look for another solution all together.

Is this correct, or am I still missing something?

Thanks,

Marlon

Re: File not found: MyConnectionString.dcu

Posted: Fri 26 Dec 2014 14:17
by ViktorV
Yes, you are right, only MyDAC Trial Edition is free, but limited by a 60-day trial period.