From: Thomas Zehbe on
Hi Bruno,

Am Freitag, 27. Oktober 2006 03:35 schrieb Bruno S. Oliveira:
> Hi Thomas and all.
>
> I found another way of achieving my goal. I'm using the functions of
> the mysgl.h directly, so I need not to install the ODBC driver in my
> machine nor in any other running my application.
> But I tried and couldn't achieve the connection to the DB with the wx
> classes.
Just one thought you might consider. If you don't use wxODBC, your app won't
be portable between Databases. You can connect using the native mysql calls.
I assume, that these don't use the odbc driver.
If you have compiled wx in debug mode, you can simply step into the wxDB calls
to see what's going on. I've done it several times and every time I learned
something. And I got everything working well until now.

Just my 2 pence

Thomas
>
> On 10/23/06, Thomas Zehbe <tz(a)ingenion.de> wrote:
> > Hi Bruno,
> >
> > Have you tried to connect from different apps like access or excel using
> > the odbc driver? Does this work? If not I would think that it's a mysql
> > related problem.
>
> Well, I didn't try that but I don't think that it was it. I'm sure it
> was something I didn't care about... for I'm a beginner in this.
>
> > Is there an adming tool to check wether the database server is alive or
> > not?
>
> Anyway, the control center tool showed that everything (server and
> data base) was fine.
>
> > Just some thoughts ...
> >
> > Regards,
> >
> > Thomas
>
> Best regards.
>
> Thanks for your consideration!
>
> > Am Samstag, 21. Oktober 2006 06:48 schrieb Bruno S. Oliveira:
> > > Hi Thomas and everyone.
> > >
> > > > I have no experience connecting to MySQL, but to PostgreSQL. Mostly
> > > > if it didn't work the reason was a misconfigured odbc on Linux. The
> > > > first thing I do is to look in the postgres logfile to check, wether
> > > > the driver has tried to connect. If it didn't, the configuration
> > > > wasn't correct.
> > >
> > > Unfortunately my application must run on Windows...
> > >
> > > It seems that the driver didn't try to connect. But I don't know
> > > what's wrong with the driver configuration...
> > >
> > > > I suggest to make an empty Database and try the db sample from
> > > > wxWidgets. If it doesn't work, your odbc config is the problem.
> > >
> > > I had already tried that... and it didn't work...
> > >
> > > Does anyone know if the mysql connector odbc 5.0.5 works with wx?
> > > If not, which driver I must use?
> > >
> > > Isn't there anyone running/developing applications for windows with
> > > mysql database connection? If yes, just tell me which mysql server and
> > > odbc connector should I use...
> > >
> > > Thanks a lot.
> > >
> > > Regards.
> > >
> > > > Regards,
> > > >
> > > > Thomas
> > > >
> > > > Am Donnerstag, 19. Oktober 2006 21:02 schrieb Bruno S. Oliveira:
> > > > > Hi list!
> > > > >
> > > > > I'm having some trouble in connecting applications to MySQL
> > > > > databases.
> > > > >
> > > > > I know some about the MySQL working but it's the first time I have
> > > > > to develop an application which has to connect to a database.
> > > > >
> > > > > I've already tried to compile and run the /wxWidgets/samples/db and
> > > > > the example on the Database classes overview. I use
> > > > > wxWidgets-2.7.0-1 in windows XP and I can't connect to the DB in
> > > > > noone of the two examples.
> > > > > I've installed MySQL 4.0.14 and the driver available in
> > > > > http://dev.mysql.com/ and also set the DNS, user ID and password
> > > > > proprerly, I think (at last according to the manual in that same
> > > > > url).
> > > > >
> > > > > In the db sample the command
> > > > > wxDbGetConnection(DbConnectInf);
> > > > > Is returning zero. Although I correctly enter the DNS, ID and
> > > > > password. I don't know what to do with that "Directory" field (when
> > > > > selecting the data source).
> > > > >
> > > > > In the database classes overview example, I can't get a database
> > > > > connection in the command
> > > > > wxDbGetConnection(DbConnectInf);
> > > > > It always return NULL.
> > > > >
> > > > > I couldn't find a more detailed tutorial on DB connection, so I
> > > > > hope anyone can help me with this or, at least, give me some
> > > > > directions.
> > > > >
> > > > > Thanks in advance!
> > > > >
> > > > > Regards.
> > > >
> > > > --
> > > > Dipl.-Ing. Thomas Zehbe
> > > > INGENION GmbH
> > > > Kuhweide 6
> > > > 31552 Apelern
> > > > Fon: 05043 / 40 57 90 4
> > > > Fax: 05043 / 40 57 90 7
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: wx-users-unsubscribe(a)lists.wxwidgets.org
> > > > For additional commands, e-mail: wx-users-help(a)lists.wxwidgets.org
> >
> > --
> > Dipl.-Ing. Thomas Zehbe
> > INGENION GmbH
> > Kuhweide 6
> > 31552 Apelern
> > Fon: 05043 / 40 57 90 4
> > Fax: 05043 / 40 57 90 7
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: wx-users-unsubscribe(a)lists.wxwidgets.org
> > For additional commands, e-mail: wx-users-help(a)lists.wxwidgets.org

--
Dipl.-Ing. Thomas Zehbe
INGENION GmbH
Kuhweide 6
31552 Apelern
Fon: 05043 / 40 57 90 4
Fax: 05043 / 40 57 90 7

---------------------------------------------------------------------
To unsubscribe, e-mail: wx-users-unsubscribe(a)lists.wxwidgets.org
For additional commands, e-mail: wx-users-help(a)lists.wxwidgets.org

From: joseph.blough on
Besides wxODBC, wxWidgets has a couple other ways to connect to a MySQL
database. There are wxMySQL (mentioned on the forums at
http://wxforum.shadonet.com) and DatabaseLayer (one of the components at
http://wxcode.com). There are also other non-wxWidgets specific C++
libraries that you might find at on http://freshmeat.net.

---------------------------------------------------------------------
To unsubscribe, e-mail: wx-users-unsubscribe(a)lists.wxwidgets.org
For additional commands, e-mail: wx-users-help(a)lists.wxwidgets.org

From: "Bruno S. Oliveira" on
Hi Joseph, Thomas and all.

Of course that it would be very nice to have this portability, but I
don't think I'll need another database... and I don't like the idea
of installing a driver in every machine running my application...

But all keep trying the wxODBC...

On 10/27/06, joseph.blough(a)thomson.com <joseph.blough(a)thomson.com> wrote:
> Besides wxODBC, wxWidgets has a couple other ways to connect to a MySQL
> database. There are wxMySQL (mentioned on the forums at
> http://wxforum.shadonet.com) and DatabaseLayer (one of the components at
> http://wxcode.com). There are also other non-wxWidgets specific C++
> libraries that you might find at on http://freshmeat.net.
>

I'm using wxMySQL... thanks! I'll look in this freshmeat. Do you
think that there are samples of DB connections there (specifically
MySQL)?

Thanks for the tips.

--
/**
* Bruno Silva de Oliveira
* Quasi Bacharel em Ciência da Computação
* http://bsoliveira.cjb.net
*/

---------------------------------------------------------------------
To unsubscribe, e-mail: wx-users-unsubscribe(a)lists.wxwidgets.org
For additional commands, e-mail: wx-users-help(a)lists.wxwidgets.org