Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Go Back   Code Forums > Application and Web Development > Standard C, C++
User Name
Password

Reply
 
LinkBack Thread Tools Display Modes
Old 11-12-2007, 07:15 AM   #1 (permalink)
cheawick
Regular Contributor
 
cheawick's Avatar
 
Join Date: Dec 2003
Location: Mary Esther, FL
Posts: 188
cheawick is on a distinguished road
Anyone ever use C++ to make a database?

Been fiddling with an idea for a quick reference database, some parts are awefully hard to find with the diagrams some manuals provide. So I thought to try to make a database program. Only problem is that I really don't have a clue as to where to start.

Anyone have some advice or a sample I could check out? And I must admit that I never did figure out the read/write to disk thing yet. =+}

Also, it don't got to be fancy, so if it's just text based that is fine by me. I need stepping stones, not limos. =+}
__________________
cheawick is offline   Reply With Quote
Old 11-12-2007, 12:35 PM   #2 (permalink)
cheawick
Regular Contributor
 
cheawick's Avatar
 
Join Date: Dec 2003
Location: Mary Esther, FL
Posts: 188
cheawick is on a distinguished road
I tried to go a little deeper to give folk an idea of what I'm asking for, but I'm bedeviled on how to attempt classes or subs due to changing data. Just this week I've had three updates to part numbers in six manuals. =+P

Am I biting off more than I can chew as a newbie? Or is there a way to keep up with new junk as it comes in? =+\

And yes, I did hit Sourceforge.net, but all the C++ stuff they had was linked to PHP, which I have no understanding of at all. That and some Sql thing. =+{
__________________
cheawick is offline   Reply With Quote
Old 11-13-2007, 07:31 AM   #3 (permalink)
Valmont
[code][/code] enforcer
 
Valmont's Avatar
 
Join Date: Mar 2003
Location: Netherlands
Posts: 1,545
Valmont is on a distinguished road
A database has nothing to do with ISO C++. I say this because now you have a hint: you need something else then c++.
Try learning ADO for example, combined with C++. C++ itself doesn't know about database-handling, but C++ can write and read files (streams).

One way or the other, you'll need to study something additional besides C++.
__________________
Valmont is offline   Reply With Quote
Old 11-13-2007, 01:23 PM   #4 (permalink)
cheawick
Regular Contributor
 
cheawick's Avatar
 
Join Date: Dec 2003
Location: Mary Esther, FL
Posts: 188
cheawick is on a distinguished road
Ah! That explains why I couldn't find pure c++ codes. My thanks! ADO sounds familiar, I appreciate your direction. =+}
__________________
cheawick is offline   Reply With Quote
Old 11-16-2007, 02:04 PM   #5 (permalink)
cheawick
Regular Contributor
 
cheawick's Avatar
 
Join Date: Dec 2003
Location: Mary Esther, FL
Posts: 188
cheawick is on a distinguished road
Now I remember why ADO is familiar, it didn't work on my linux box, but the tiny experience I had with it worked on my WinME system. Hmm... Is there a more agreeable item I might use?

What are takes on PHP and the MySQL stuff?

=+}
__________________
cheawick is offline   Reply With Quote
Old 11-16-2007, 04:35 PM   #6 (permalink)
DJMaze
Senior Contributor
 
DJMaze's Avatar
 
Join Date: Mar 2005
Posts: 635
DJMaze is on a distinguished road
Why not write your own C++ classes around the C exports of the mysql.so?
__________________

UT: Ultra-kill... God like!
DJMaze is offline   Reply With Quote
Old 11-17-2007, 11:27 AM   #7 (permalink)
Valmont
[code][/code] enforcer
 
Valmont's Avatar
 
Join Date: Mar 2003
Location: Netherlands
Posts: 1,545
Valmont is on a distinguished road
Excactly.
__________________
Valmont is offline   Reply With Quote
Old 11-17-2007, 12:45 PM   #8 (permalink)
cheawick
Regular Contributor
 
cheawick's Avatar
 
Join Date: Dec 2003
Location: Mary Esther, FL
Posts: 188
cheawick is on a distinguished road
Quote:
Originally Posted by DJMaze View Post
Why not write your own C++ classes around the C exports of the mysql.so?
Alrighty then, now we're getting somewhere! So please tell me about this mysql.so please. I'm going to hunt down mysql stuff now, so any additional info on how I find (or use) these exports would be helpful.

Also, I thought that you couldn't call C stuff into a C++ program. That was one of my biggest failures, I kept mixing up C and C++ in my programs. Or am I overlooking something basic here.

Additionally, thank you Valmont, your agreement here means a lot. =+D
__________________
cheawick is offline   Reply With Quote
Old 11-17-2007, 01:12 PM   #9 (permalink)
Valmont
[code][/code] enforcer
 
Valmont's Avatar
 
Join Date: Mar 2003
Location: Netherlands
Posts: 1,545
Valmont is on a distinguished road
MySQL has a C++ wrapper called MySQL++.
See MySQL++ Documentation
It would be tedious to explain you all the steps involved.

For all API's, see MySQL AB :: MySQL 5.0 Reference Manual :: 23 APIs and Libraries
The latter site is my primary site when it comes to mysql, along with a million other users/administrators/programmers
__________________
Valmont is offline   Reply With Quote
Old 11-17-2007, 02:26 PM   #10 (permalink)
cheawick
Regular Contributor
 
cheawick's Avatar
 
Join Date: Dec 2003
Location: Mary Esther, FL
Posts: 188
cheawick is on a distinguished road
Quote:
Originally Posted by Valmont View Post
MySQL has a C++ wrapper called MySQL++.
See MySQL++ Documentation
It would be tedious to explain you all the steps involved.

For all API's, see MySQL AB :: MySQL 5.0 Reference Manual :: 23 APIs and Libraries
The latter site is my primary site when it comes to mysql, along with a million other users/administrators/programmers
No worries, actually this is what I want, stepping stones. I'll admit that I'm very concerned with attatching to another form of programming, but if that is what will get my idea to actual usable crud, then I'm all for it! =+}

Thanksya'll!
__________________
cheawick is offline   Reply With Quote
Old 11-17-2007, 02:34 PM   #11 (permalink)
Valmont
[code][/code] enforcer
 
Valmont's Avatar
 
Join Date: Mar 2003
Location: Netherlands
Posts: 1,545
Valmont is on a distinguished road
This is not another form of programming. This is programming.
Using an API, or multiple API's is normal.
When you program databases, you want a database api. When you program graphix, you want a gfx api (directx, openg, windows GDI etc).
Etc. etc. etc.
__________________
Valmont is offline   Reply With Quote
Old 11-17-2007, 03:13 PM   #12 (permalink)
cheawick
Regular Contributor
 
cheawick's Avatar
 
Join Date: Dec 2003
Location: Mary Esther, FL
Posts: 188
cheawick is on a distinguished road
Quote:
Originally Posted by Valmont View Post
This is not another form of programming. This is programming.
Using an API, or multiple API's is normal.
When you program databases, you want a database api. When you program graphix, you want a gfx api (directx, openg, windows GDI etc).
Etc. etc. etc.
Oh, wow. Mmm... I may be getting over my head on this, but what better way to learn!

My biggest concern is portability between linux and windows, will I be able to transfer my raw data and code between both systems with out much worry? Actually, let's leave that for now. Perhaps that will be something I should ask later after I have a working project. I'm sure ya'll will have much advice on this once I have something to show for ya'lls help. =+}

Er... What is API? I see it referenced all the time but don't know what it stands for. =+\
__________________
cheawick is offline   Reply With Quote
Old 11-17-2007, 04:53 PM   #13 (permalink)
DJMaze
Senior Contributor
 
DJMaze's Avatar
 
Join Date: Mar 2005
Posts: 635
DJMaze is on a distinguished road
Application programming interface - Wikipedia, the free encyclopedia

And for cross-platform (linux, windows, osx, etc.) that will be a whole different discussion and that is definatly troublesome if you have no knowledge about GUI design and the platform SDK's for Windows and XWindows.
Then you should start with a GUI toolkit, just to get some basics (FLTK or wxWidgets is good)
__________________

UT: Ultra-kill... God like!
DJMaze is offline   Reply With Quote
Old 11-18-2007, 12:25 PM   #14 (permalink)
cheawick
Regular Contributor
 
cheawick's Avatar
 
Join Date: Dec 2003
Location: Mary Esther, FL
Posts: 188
cheawick is on a distinguished road
Thanks for the heads up DJM. I was originally going to stick with text based screens, but since it looks like I'll have to import/export info I would have to assume that adding a GUI will aid the organization of the info.

Which brings up a possibly silly question: will I also have to figure a way out to print screen data or will the usual C++ calls still work? =+}

I'm not giving up yet, altho this is gonna be one hellva test of the little knowlege I have so far. =+D
__________________
cheawick is offline   Reply With Quote
Old 11-19-2007, 10:58 AM   #15 (permalink)
Valmont
[code][/code] enforcer
 
Valmont's Avatar
 
Join Date: Mar 2003
Location: Netherlands
Posts: 1,545
Valmont is on a distinguished road
Again, C++ has never heard of "printers", just like it never heard of "databases". So if you would like to print, you'll need an API that supports sending streams to a printer. Like DJM mentioned, FLTK or wxWidgets do just fine.
__________________
Valmont is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
C Database Programming bakoo Platform/API C++ 3 11-20-2006 04:20 PM
Include file shown correctly in FF not in IE Stoner HTML, XML, Javascript, AJAX 2 04-21-2006 07:56 AM
Starting out with C anon C 0 02-24-2003 01:06 PM
edit? anon Lounge 10 11-21-2002 03:02 PM


All times are GMT -8. The time now is 05:49 AM.


Powered by vBulletin Version 3.6.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2006, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting
Open Circle