Problems upgrading MySQL application from Delphi 2006 to 2010 - mysql

I upgraded my Delphi to 2010 version and I tried to open and run application written in Delphi 2006. The app is using mysql by dbexpress with libmysql.dll and a second driver found somewhere on the Internet.
I can't run it on 2010. I'm always getting "missing libmysql.dll library". I tried to get new version of it but it didn't help. Copying this library into almost all system directories didn't help.
I'm out of any ideas what to do, how do I connect to database :(

It's most probably a unicode problem. PChar is no longer a pointer to an ansistring, but a pointer to a unicodestring. Try and upgrade the dbexpress driver. I don't mean the dll, but the dbexpress wrapper code. I'd need a little more information to help further though.

check you have dbxmys.dll available to your app too (in the exe dir or on the path)

Related

Delphi can't connect to MySql, claims libmysql.dll isn't in the path when it is

Before anyone marks this a duplicate, please read to the end, as none of the many similar questions helped.
I've just installed Delphi Community Edition and MySql (recommended download from this link) on Windows 11, but am having trouble connecting Delphi to MySql.
I used MySql Workbench to create a new connection, and created a new database with a table and some sample data.
If I start Delphi and create a new Windows VCL project, then choose Tools -> FireDAC Explorer, then try to expand the connection, I get an error "Cannot load vendor library [libmysql.dll, libmariadb or libmysqld.sll]"
I'm assuming that only libmysql.dll is relevant to me, as I don't use Maria, and don't have the other DLL anywhere on my system. I used sigcheck to check that I indeed have a 64-bit version of the DLL.
I have the same error if I use the Data Explorer in Delphi itself.
I read a lot of questions here about this exact error, but all of the ones I've seen suggest one of two things, neither of which apply here...
Add the DLL's location to the PATH environment variable - I have libmysql.dll in the C:\Program Files\MySQL\MySQL Server 8.0\lib folder, and have added that to my PATH environment variable, but it didn't help. I restarted Delphi, but no joy. I even added a TEdit to my form in Delphi, with the following code...
Edit1.Text := GetEnvironmentVariable('PATH');
This confirmed that I had set the environment variable correctly.
Copy the DLL to the project's bin folder. I tried this as well, and it didn't make any difference. However, as I haven't got as far as trying to connect my code to MySql, I didn't expect this to help. I can't even get Delphi itself to connect.
Anyone any ideas? I know there are a lot of questions about this error, but none of them worked for me.
Thanks
Please check the rest of the error message. Sometimes it specifies the bitness of the DLL you need. It's easy to miss that bit and get the wrong version.
I think MySql comes with a 64-bit DLL, but for some reason I never worked out, Delphi seems to need a 32-bit version. I had to search around and download one from a 3rd-party site, which I don't like, but it did work.

Can't find libmysql.dll and others connecting to MYSQL from ZeosLib in Delphi

Excuse me, I would like to ask about how can I connect Delphi with MYSQL with ZeosLib. I already know the steps but I can't get it yet cause when I change the Properties in ZConnection where Connection = True, it can't. And this is the message
By the way, my OS actually Linux Ubuntu and I have to use VirtualBox to work on it.
So if there's somebody know this, I'm begging you guys to help me.
You need to download the dynamic link library that the error message is referencing. The following link https://dev.mysql.com/downloads/windows/installer/8.0.html takes you to MySQL Download page for the latest version of MySQL 8.0.13, or go to this page if you are on a 5.X version https://dev.mysql.com/downloads/installer/
Download the appropriate file 32bit or 64 bit and install it. Find the installed libMySQL.dll and put that file in the same directory as the executable being created by Delphi
You may instead set the Zeos Connection Component's Library Location property to the directory that the dll is located in.
I have got a similar project and I used this link:
http://docwiki.embarcadero.com/RADStudio/Tokyo/en/Connect_to_MySQL_Server_(FireDAC)
and it's working.
But if you mean : set the "connection := true" in designtime, you have to use the platform assistant under the linux as well.

Visual Studio 2015 not installing Mysql.data in NuGet

UWP App not being able to work with MySql
I have made an app in UWP and instead of using SQLLite which seems to be the norm for Visual Studio 2015 I want to use MySql. I have already connected my Azure mysql database to Visual Studio via the 'Server Explorer'.
I'm using MySQL Workbench to update my tables within my connected database from Azure but I cannot actually write any code to access my tables as whenever I try to install MySql.data/.entity/etc in the NuGet Package Manager I get an error.
nuget error
I tried downloading the Mysql installer, the Mysql drivers for Ado and ODBC. I even tried downloading the MySql for Visual Studio option as I found out that Visual Studio is not compatibile with MySql and instead requires the MySql for Visual Studio download but I still have errors whenever I try to use MySql in my code as I need an assembly reference for it but I'm having no luck in being able to get one that doesn't error.
Does anybody have any idea how I could actually use MySql within Visual Studio 2015?
This is what I've been using as my guideline but I can't seem to get past the Mysql.data errors when installing.
http://web3.codeproject.com/Articles/1074242/Designig-your-Azure-MySQL-DB-with-a-UWP-Demo
I have seen a lot of people talk about this but there is no one straightforward fix (I've tried a lot of the fixes, one in particular being to use Vs13 to install Mysql in the Nuget package manager and then it should update within VS15 but as my app is a UWP VS13 does not actually load/read it so that idea isn't good to me, might help anyone else though)
Starting with 6.7, Connector/Net fully supports building Windows Store apps. But using Connector/Net RT is not by install the Nuget package, it just reference the MySql.Data.RT.dll assembly according to MySQL Connector/Net Developer Guide:
Using Connector/Net RT is easy. Simply create a Windows Store application using Visual Studio and then reference the MySql.Data.RT.dll assembly in your project. The code you write should be exactly the same as for normal Connector/Net (including using same namespace MySql.Data.MySqlClient) except for the differences listed above.
You may find this dll at C:\Program Files (x86)\MySQL\Connector.NET 6.79\Assemblies\RT if you have install the connector. You can also download the mysql-connector-net-6.7.9-noinstall.zip to find this file inside the folder. I also have a MySql UWP sample before and has the dll here. Right click your project and add reference for this it will work.
More details please reference this sample

can't find pinvoke dll dbnetlib.dll error on ce 5.0

i'm deploying an app for ce 5.0 that connect to a sql server 2008 into a server:
i've installed in the ce sql.wce5.armv4i.CAB and sql.dev.ENU.wce5.armv4i.CAB, but when I try to connect to the database appears the error:
can't find pinvoke dll dbnetlib.dll
how can I solve this? thanks in advance
That DLL appears to be the "Super Socket Net Lib" and is probably part of a full-framework solution, though I'm not sure what distributes it. It doesn't matter for the context of this question where it comes from because the fact you see the error tells me that you're probably using some desktop component or reference in your Compact Framework solution, which will not work. You can only use CF assemblies, so whatever is trying to use dbnetlib.dll must be removed from the project.

dll files for creating a setup

I 'm working on an application using rad studio 2009 (c++) and mySQL. I want to build a setup so I can set up my application and on other PCs without installing and rad studio. As far as I 've searched, I will need some dlls. Does anyone know what dlls? I couldn't find out...
please help!
For C++ Builder if you don't use runtime packages and you link against the static RTL then you don't need to supply anything beyond the compiled .exe.
I couldn't say what you need for the database connection, but I imagine it is documented and Johan has provided you with an answer that addresses this part of your question.
Dependency Walker can be used to investigate the dependencies.
You need libmySQL.dll
and if you're using dbExpress you'll also need: dbxmys.dll
If you're using ZEOS you'll only need the libMySQL.dll, but AFAIK only ZEOS 7 alpha works in Unicode Delphi/C++ Builder
Be careful to make sure libMySQL.dll is is the exact version that goes with the MySQL server you are connecting against.