Hi.
I 've started writing Mysql FrontEnd and I've been thinking which solution would be better: Wxwidgets with ODBC or Wxwidgets with wxMysql. This should be simple program which can be easily extended without any complicated features and it is supposed to connect only to mysql. Any suggestions??
Frontend for Mysql for Linux and Windows Topic is solved
-
- Earned a small fee
- Posts: 18
- Joined: Thu Jul 13, 2006 6:34 pm
-
- Moderator
- Posts: 610
- Joined: Tue Nov 29, 2005 7:10 pm
- Location: Israel
This one was posted today on the mailing list:
DatabaseLayer is a wxCode library written to offer a JDBC-like API to
database access. For a summary of the functionality offered by
DatabaseLayer, visit
http://wxcode.sourceforge.net/docs/data ... mmary.html. The main
web page is located at
http://wxcode.sourceforge.net/docs/databaselayer/. At this time, the
supported database backends are SQLite, Firebird, PostgreSQL, MySQL,
ODBC, Oracle (partial), and TDS (which includes MS SQL Server and Sybase
- both partially supported)
Eran
DatabaseLayer is a wxCode library written to offer a JDBC-like API to
database access. For a summary of the functionality offered by
DatabaseLayer, visit
http://wxcode.sourceforge.net/docs/data ... mmary.html. The main
web page is located at
http://wxcode.sourceforge.net/docs/databaselayer/. At this time, the
supported database backends are SQLite, Firebird, PostgreSQL, MySQL,
ODBC, Oracle (partial), and TDS (which includes MS SQL Server and Sybase
- both partially supported)
Eran
-
- Earned a small fee
- Posts: 22
- Joined: Sat Mar 10, 2007 1:44 pm
My advice is to use ODBC classes from wxWidgets.
ODBC drivers are avalaible for almost every database. wxDB allows to use a pool of connections. So you are able to make some queries parallel.
DatabaseLayer is more lowlevel than wxDB. And if you are making simple program it is the best way.
On other hand there is some problem with MySQL3.5 connector and new MySQL5.0beta. As wxDB class primarily works with ODBCv2 the MySQL2.5 connector will work fine. Problem is with ODBCv3+. To make MySQL3.5 connector work on windows you must use some "dirty hack". Read my post about it:
http://forums.wxwidgets.org/viewtopic.p ... highlight=
It works fine then. Without that "hack" you will not be able to use Date, Time and Blob. But then all works fine.
Enjoy.
[EDIT]
There is only need of doing this registration of environmenth atribut.
ODBC drivers are avalaible for almost every database. wxDB allows to use a pool of connections. So you are able to make some queries parallel.
DatabaseLayer is more lowlevel than wxDB. And if you are making simple program it is the best way.
On other hand there is some problem with MySQL3.5 connector and new MySQL5.0beta. As wxDB class primarily works with ODBCv2 the MySQL2.5 connector will work fine. Problem is with ODBCv3+. To make MySQL3.5 connector work on windows you must use some "dirty hack". Read my post about it:
http://forums.wxwidgets.org/viewtopic.p ... highlight=
It works fine then. Without that "hack" you will not be able to use Date, Time and Blob. But then all works fine.
Enjoy.
[EDIT]
There is only need of doing this registration of environmenth atribut.
Code: Select all
SQLSetEnvAttr( DbConnectInf->GetHenv(), SQL_ATTR_ODBC_VERSION, (SQLPOINTER)SQL_OV_ODBC3, SQL_IS_INTEGER );
Marek Gach
BUT Brno, Czech Republic
BUT Brno, Czech Republic
-
- Super wx Problem Solver
- Posts: 466
- Joined: Sat Sep 18, 2004 2:49 am
- Location: California, USA
If we are writing a generic application then it makes sense to use ODBC but for writing a Front End (which I presume is the tool that allows you to play with MySQL database), it is advisable to stick with native api provided by MySQL libraries. There is no api available in the ODBC to provide advanced information about MySQL server like Query performance, Plan of a Query, displaying advanced output (debug/server) msgs etc. Although DatabaseLayer and wxMySQL doesnt provide these functions, it will be straight forward to add those advanced functions to it.maro.gach wrote:My advice is to use ODBC classes from wxWidgets.
-Guru Kathiresan
wxWidgets Form Designer for Delphi and C++ Builder - http://www.twinforms.com
Code snippets for wxWidgets - http://wxsnippets.com
Code snippets for wxWidgets - http://wxsnippets.com