473,395 Members | 1,466 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.

c++ and databases

Hi,

Please let me know if there is a better newsgroup to post this question on,
but here goes....

I want to learn the basics of having a C++ program interact with databases
such as MySQL or SQLServer.

In particular, I want to write a program which parses a large text file and
then siphons off the
various data into appropriate tables and columns in a db.

1. Can anyone give me any good references to get started (books or web
articles)?

2. Can anyone give me an overview of what's involved here, how difficult
this will
be to learn, etc? Right now I am a beginner C++ programmer and a fairly
experienced DB
designer.

3. Can anyone explain how such interactions are accomplished, just in very
general language.
Does this involve COM objects? How can C++ connect to and issue commands to
a DB?

Thanks for any info,
cpp
Jul 19 '05 #1
4 2145
cppaddict wrote:
Hi,

Please let me know if there is a better newsgroup to post this question on,
but here goes....

I want to learn the basics of having a C++ program interact with databases
such as MySQL or SQLServer.

In particular, I want to write a program which parses a large text file and
then siphons off the
various data into appropriate tables and columns in a db.

1. Can anyone give me any good references to get started (books or web
articles)?

2. Can anyone give me an overview of what's involved here, how difficult
this will
be to learn, etc? Right now I am a beginner C++ programmer and a fairly
experienced DB
designer.

3. Can anyone explain how such interactions are accomplished, just in very
general language.
Does this involve COM objects? How can C++ connect to and issue commands to
a DB?


You're in the wrong place -- C++ itself knows not of databases.

STFW!

[try: http://www.mysql.com/products/mysql++/index.html]

HTH,
--ag


--
Artie Gold -- Austin, Texas
Oh, for the good old days of regular old SPAM.

Jul 19 '05 #2
cppaddict,

On Wed, 22 Oct 2003 01:38:11 UTC, "cppaddict" <cp*******@yahoo.com> wrote:
Hi,

Please let me know if there is a better newsgroup to post this question on,
but here goes....

I want to learn the basics of having a C++ program interact with databases
such as MySQL or SQLServer.

In particular, I want to write a program which parses a large text file and
then siphons off the
various data into appropriate tables and columns in a db.

1. Can anyone give me any good references to get started (books or web
articles)?
Look at the examples for a given database, such as MySQL. There are
examples and the engine is pretty easy to get installed. It will teach
you the basics. MS Access and MS SQL are progressively more industrial
strength but follow the same basic guidelines. If you use one of the
MS interfaces, such as ODBC, porting your code from one database to another
is very simple.

There are also several databases with full source. Some are like MySQL.
2. Can anyone give me an overview of what's involved here, how difficult
this will
be to learn, etc? Right now I am a beginner C++ programmer and a fairly
experienced DB
designer.
Given the examples from MySQL, you could probably adapt them to your
own needs pretty quickly. MS SQL offers many more interface types: DAO,
ADO, ODBC, XML, ...
3. Can anyone explain how such interactions are accomplished, just in very
general language.
Does this involve COM objects? How can C++ connect to and issue commands to
a DB?
Any form of IPC (Inter process communication) is useful. Many engines are

just TCP/IP servers. Any small example should get you started.
Thanks for any info,
cpp


David
Jul 19 '05 #3
On Wed, 22 Oct 2003 01:38:11 GMT
"cppaddict" <cp*******@yahoo.com> wrote:
I want to learn the basics of having a C++ program interact with
databases such as MySQL or SQLServer.


www.wxwindows.org

br
socketd
Jul 19 '05 #4
cppaddict <cp*******@yahoo.com> wrote in message
news:7c*****************@newssvr25.news.prodigy.co m...
Hi,

Please let me know if there is a better newsgroup to post this question on, but here goes....

I want to learn the basics of having a C++ program interact with databases
such as MySQL or SQLServer.

In particular, I want to write a program which parses a large text file and then siphons off the
various data into appropriate tables and columns in a db.

1. Can anyone give me any good references to get started (books or web
articles)?

2. Can anyone give me an overview of what's involved here, how difficult
this will
be to learn, etc? Right now I am a beginner C++ programmer and a fairly
experienced DB
designer.

3. Can anyone explain how such interactions are accomplished, just in very general language.
Does this involve COM objects? How can C++ connect to and issue commands to a DB?

Thanks for any info,
cpp

For SQL server, better use ADO. Go to: microsoft.public.data.ado for more
info.

To issue command, you need to use an ADO connection object of pointer type,
_CommandPtr. MSDN has included tons of info about this.
Jul 19 '05 #5

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

Similar topics

2
by: Gary L. Burnore | last post by:
REQUEST FOR DISCUSSION (RFD) unmoderated group comp.databases.mysql This is an invitation to discuss the following proposal to create newsgroup comp.databases.mysql. Please note that YOU CANNOT...
8
by: William Drew | last post by:
REQUEST FOR DISCUSSION (RFD) unmoderated group comp.databases.mysql This is an invitation to discuss the following proposal to create newsgroup comp.databases.mysql. Please note that YOU...
0
by: Cara | last post by:
LAST CALL FOR VOTES (of 2) unmoderated group comp.databases.etl Newsgroups line: comp.databases.etl Extraction, transformation, loading issues. Votes must be received by 23:59:59 UTC, 12 Dec...
1
by: Hai-Chu Hsu | last post by:
Hi, I want to restore my databases from the old SQL Server installation into a new installation of SQL Server. My new installation of SQL Server has different data path from the old...
0
by: Cara Altman | last post by:
REQUEST FOR DISCUSSION (RFD) unmoderated group comp.databases.etl This is a formal Request For Discussion (RFD) for the creation of a world-wide unmoderated Usenet newsgroup...
3
by: Amit | last post by:
Hi when I try to run LIST ACTIVE DATABASES AT DBPARTITIONNUM <partnum> or LIST ACTIVE DATABASES GLOBAL, I always get an error message. Does anyone know why? I'm on v8 fp 5 output : db2 => list...
1
by: com | last post by:
Extreme Web Reports 2005 - Soft30.com The wizard scans the specified MS Access database and records information such as report names, parameters and subqueries. ......
6
by: Andy | last post by:
Someone posted this official proposal to create comp.databases.postgresql.general again. He wrote his own charter. As far as I know, he did not consult any of the postgresql groups first. There...
6
by: Tjerk Wolterink | last post by:
Don't know wether this is the right newsgroup, anyways: Has anyone some experience with Native XML Databases. Im planning to use this: http://exist.sourceforge.net/ It has many advantages...
3
by: AK | last post by:
Hi Our product uses MS-SQL Server 2000. One of our customer has 10 installations with each installation stroring data in its own database. Now the customer wants to consolidate these databases...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.