PDA

View Full Version : How to use both mysql embedded and server plugin in one application?



qlands
16th August 2010, 14:36
Hi,

I am working in a application where I need to use both server and embedded mysql plugins. The problem is that in the QT reference it only shows how to use the plugin with embedded or server but I cannot figure it out how to use both at the same time.

Any idea? or example to follow?

Many thanks,
Carlos.

alexisdm
16th August 2010, 16:50
You probably need to compile 2 separate plugins each linked with a different mysql dll.

Try to copy the directory $QTDIR/src/plugins/sqldrivers/mysql and rename any reference to the driver name ("QMYSQL") and to the plugin name (qsqlmysql) to something else.

qlands
15th April 2011, 10:33
ok.

I managed to create a new plugin linked with the embedded library libmysqld.so

Now, how I need to setup the connection? In other languages like Delphi I need to ser BaseDir and DataDir. How can I set this parameter with Qt?

Thanks,