473,395 Members | 1,763 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

create a c++ based program using mysql odbc.

I want my software to be independant of operation system and databases.

That's why I want to use odbc, and don't want to use MFC.
Here I have some questions to ask:
1. On unix (like sun solaris), does there exists any kind of midware
like odbc?
2. I search on the internet, and find most of the examples are based on

PHP. Is there any c++ examples?
3.Once I chose odbc, does that mean that whatever kind of database I
would use later, I don't have to change my source code?
4. now I program on window xp platform. If I use odbc, when impliment
my program to a unix platform, do i have to rewrite my code?
I just started this project, and I'm a newbie. The problems may be a
little bit of stupid.
Can you guys give me some information about this topic?

Dec 26 '05 #1
2 2768
xiaotom wrote:
I want my software to be independant of operation system and databases.
I would do this with wxWidgets. It is a cross-platform library, which
allows you to build native looking GUI (when compiled on Windows, it
looks like a Windows program, when compiled on Linux, it looks like a
Linux program etc.) and use databases via ODBC and a lot more:

http://www.wxwindows.org/
3.Once I chose odbc, does that mean that whatever kind of database I
would use later, I don't have to change my source code?
No, it doesn't guarantee it. The reason for this is that even if you
write your queries using ANSI SQL, there are still some databases that
don't fully support it. The less functions you use and the more basic
queries you write the better are changes that no changes are required.
But using ODBC is pretty much best you can do for this purpose.
4. now I program on window xp platform. If I use odbc, when impliment
my program to a unix platform, do i have to rewrite my code?


If you use wxWidgets or other cross-platform library and no external
single platform functions, no. If you use MFC or other single platform
library, then yes. But some attention should be put for the compiler
also, as some compilers allow you to write code that is not portable and
it will give you some trouble when trying to compile with different
compiler. Gcc is propably most used cross-platform compiler.

If you deside to use wxWidgets with gcc it might be easier to use some
IDE, which has wxWidgets library and the compiler with it. Some
alternatives are:

# Quite mature, Freeware, not open source, has basic features and some
minor bugs. But server often "Bandwidth Limit Exceeded" state:
http://www.parinyasoft.com/

# Quite mature, open source, but comes currently with quite old version
of wxWidgets. But you can compile the wxWidgets by yourself if you so
deside:
http://www.codeblocks.org/

# Young project, open source, doesn't have debugger and lacks on some
other features also, but has latest version of wxWidgets library. Only
for Windows currently:
http://ossdevstudio.finngerd.net/
Dec 26 '05 #2
Wow, what a reply. it really helps! Facing lots of programming
technologies, i was overwhelmed. Thank you for these good advices.
I now decide to choose odbc-oriented program. As regards to the GUI
library, I will choose one from QT and wxwidgets.
Now I want to get the database ready. So it will be my next step work.

Dec 27 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Soren Bendtsen | last post by:
Hi, I am trying to connect to a MySQL database, using the .Net framework. I installed the newest MyODCB (3.51) and the .Net ODBC drivers from Microsoft. I made a System DSN using the...
1
by: Dave Lewis | last post by:
Hi All, Can someone point me in the right direction? I have a web site which uses a MySQL database to store items for sale, client information and credit card info etc (or will be...
11
by: Matt | last post by:
Hi everyone, still pretty new to MySQL. I was wondering if there is a way to automatically filter records based on a mysql userlogin name?? I have serveral databases that I want to combine in...
7
by: dog | last post by:
I've seen plenty of articles on this topic but none of them have been able to solve my problem. I am working with an Access 97 database on an NT4.0 machine, which has many Access reports. I...
1
by: AmitK | last post by:
is it possible to create a myi, myd file for mysql using a C program. I am using Stata that is written in C API, and I want to write the data out to MYSQL database. Using ODBC and loading the data...
2
by: SKB | last post by:
Hi, I am absolutely new to this area. I am getting the following difficulty : Access denied for user 'ODBC'@'localhost' (using password: NO) when I try the mysql command from within the...
1
by: shun | last post by:
Hello, I need an sample program to connect mysql server by using odbc. thanks in advance
4
by: Jayhawk | last post by:
Hello, I am trying to use a MS Access front end application to link to data tables stored in MySQL Server. I am running MySQL 5.0 Community Server, MySQL Connector/ODBC 3.51, and MS Access...
2
by: Hetal | last post by:
Hi... I am a newbie VB.NET developer and i am looking at working with ADO.NET rather than ADO. In one of our native VB application with ADO, we used to create 1 connection object and that would...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.