how to read data from MySQL table... Topic is solved

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
rakeshthp
I live to help wx-kind
I live to help wx-kind
Posts: 154
Joined: Mon Apr 06, 2009 10:02 am
Location: India

how to read data from MySQL table...

Post by rakeshthp » Thu Aug 27, 2009 11:47 am

Hello friends..

I am developing a database application.. i got a simple table called customer with the following schema..

cid integer, cname varchar(25), caddress text, ccontact varchar(15)

I am using mysql.. I went through this example and started with a code.. http://docs.wxwidgets.org/stable/wx_odbcoverview.html

I am able to read other three fields from the table... But the customer id field is not giving me proper result... if the id is 1, it is showing some unwanted value like -182342..

Eagerly waiting for responses..

Thanks in advance
Rakesh Patil

illnatured
Filthy Rich wx Solver
Filthy Rich wx Solver
Posts: 234
Joined: Mon May 08, 2006 12:31 pm
Location: Krakow, Poland

Post by illnatured » Fri Aug 28, 2009 7:54 am

Can you show your code?
VC++ 2005 / Windows XP / wxWidgets 2.8.9

ilovasz
Earned a small fee
Earned a small fee
Posts: 21
Joined: Tue Jul 10, 2007 6:56 pm

Post by ilovasz » Fri Aug 28, 2009 9:21 am

Hi,
according to http://wiki.wxwidgets.org/ODBC, wxODBC has been removed from wxWidgets 2.8+
You should take a look at the wxDatabaseLayer component.
You can find it here:
http://wxcode.sourceforge.net/components/databaselayer/

Other alternatives are
wxDba (http://debea.net/trac/wiki/WxDba)
wxMySQL (http://ttanalytics.nm.ru/wxcomponents/w ... index.html)

LI

rakeshthp
I live to help wx-kind
I live to help wx-kind
Posts: 154
Joined: Mon Apr 06, 2009 10:02 am
Location: India

Post by rakeshthp » Fri Aug 28, 2009 10:32 am

hi ilovasz..

Thanks for those links.. I'll try with it and get back to you...

Thanks once again..

ilovasz
Earned a small fee
Earned a small fee
Posts: 21
Joined: Tue Jul 10, 2007 6:56 pm

Post by ilovasz » Fri Aug 28, 2009 11:28 am

You're welcome

LI

TrV
Ultimate wxWidgets Guru
Ultimate wxWidgets Guru
Posts: 630
Joined: Wed Jul 04, 2007 1:12 pm

Post by TrV » Sat Aug 29, 2009 1:40 pm

Here is something about DatabaseLayer which mays interest you: http://dev.arqendra.net/#dbl

wxTNewb
Knows some wx things
Knows some wx things
Posts: 28
Joined: Tue Sep 04, 2007 3:57 pm

Post by wxTNewb » Sat Oct 10, 2009 2:24 am

Other alternatives are
wxDba (http://debea.net/trac/wiki/WxDba)
I have a question abut wxDba. recently I've tried it, but for some reason, it depends on wxODBC.... I'm not so sure this is an alternative as yet...

So my question is why does it depend on wxODBC?

vsp
Knows some wx things
Knows some wx things
Posts: 35
Joined: Mon Feb 21, 2005 12:52 pm

Post by vsp » Sat Oct 10, 2009 10:15 am

I have downloaded and built wxMySql. It seems to be good and works fine.

Thanks.

Post Reply