473,788 Members | 2,820 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2794
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
5537
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 driver, and i get it to connect - so far so good.
1
1196
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 soon). I'm
11
11992
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 order to manage the databases more efficiently. - I'm currently using MySQL 4.1.12 and I'm currently testing 5.0.14 - I have a databases for each user account. - Each database has the same schema and entity relation model.
7
8869
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 want my users to be able to select a report, click on a command button on a form, which will then automatically create the report as a pdf file and save it to the user's machine. I am using Adobe Acrobat (5.0 I think) and have Adobe Distiller as a
1
1527
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 in MYSQL from STATA takes forever. Can anyone please tell me if I can create the myd files by using the data in memory thru C programming. thanks Amit
2
74722
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 C:\Program Files\MySQL\MySQL Server 5.0\bin on the command window. Please note that the MySQL is runnging as I have tried the command NET START MySQL and it gives the following output: The requested service has already been started. More help is...
1
2971
by: shun | last post by:
Hello, I need an sample program to connect mysql server by using odbc. thanks in advance
4
2761
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 2003. I have set up a test database and table in MySQL, but the problem comes when trying to link to this table through Access. From the Link Tables menu option, I choose ODBC Databases, but no "Select Data Source" dialogue window will pop up. All...
2
6656
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 help us to connect to MS-SQL and MySQL alternatively based on the database type and connection string i provide. So, one connection object was good enough to connect to any of these 2 type of databases. The sample connection string we use to...
0
9656
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10173
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10110
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8993
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7517
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6750
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5399
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5536
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3674
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.