![]() |
| | #1 |
| Registered User Join Date: Jul 2009
Posts: 8
| What I want to know is the commands I need to use to take a data from a specific cell in the database and/or the excell file and for example add it to another non-database variable. For example if the database looks like this Animal |Age | Collor | --------------------------------- Dog |5 | Brown | Cat |3 | White | Dog |10 |Black | What commands are needed to lets say have the Age of the Black Dog calculated in human years (5*7) If there is a site I could look for more info about retrieving Data from databases, I think that will do also. Thanks |
| AntV is offline | |
| | #2 |
| Registered User Join Date: Sep 2004 Location: California
Posts: 2,845
| |
| bithub is offline | |
| | #3 |
| Registered User Join Date: Jul 2009
Posts: 8
| Thanks, I guess, but thats a lot of info. I have started reading all that, but if you or somebody else had a more easy solution, please tell me. I must finish this asap and time for encyclopedic reading is not a luxury I have p.s. I forgot to say that I already have connected the database to the GUI as a data source Last edited by AntV; 07-16-2009 at 12:10 PM. |
| AntV is offline | |
| | #4 | |
| and the Hat of Guessing Join Date: Nov 2007
Posts: 8,740
| Quote:
Also, if you think a 16-page tutorial is "encyclopedic" then you might be in the wrong line of work. (And so far as I can tell the tutorial answers your question by the time you get to page 3.) | |
| tabstop is offline | |
| | #5 |
| Registered User Join Date: Jul 2009
Posts: 8
| Yeah, sorry about that... I started from the top page. Actually the tutorials are great. Now I have a new problem. I try to "play around" with those tutorials, but I am having a problem with some "#include" and "using namespace" command. (for example #include "cmdline.h" and #include "printdata.h" )I get a lot of Cannot open or include file: No such file or directory. I do get those messages a lot...Btw thanks for all those quick responses Last edited by AntV; 07-16-2009 at 01:11 PM. |
| AntV is offline | |
| | #6 |
| and the Hat of Guessing Join Date: Nov 2007
Posts: 8,740
| So far as I can tell, cmdline.h and printdata.h are part of the mysql++ package. Do you have the entire package? (In fact, those examples there I think are part of the mysql++ package too -- the header files might be in that examples directory.) |
| tabstop is offline | |
| | #7 |
| Registered User Join Date: Jul 2009
Posts: 8
| So should I just copy all those files in the include folder of Visual Studio or somewhere else? Isn't that what the install of SQL++ should do? |
| AntV is offline | |
| | #8 |
| and the Hat of Guessing Join Date: Nov 2007
Posts: 8,740
| #include "this file" (as opposed to #include <this file>) generally means "this file is in the directory with the code in it, as opposed to the default include library for everything." |
| tabstop is offline | |
| | #9 |
| Registered User Join Date: Jul 2009
Posts: 8
| I still haven't found how to make use of MySQL++ and theworst is I don't know what I'm doing wrong |
| AntV is offline | |
| | #10 |
| and the Hat of Guessing Join Date: Nov 2007
Posts: 8,740
| It's a bit tricky, 'cause I don't have the package installed -- but have you read the readme for windows? Do you have that examples folder with those sample projects in it? Open those and run with them. |
| tabstop is offline | |
| | #11 | |||
| int x = *((int *) NULL); Join Date: Jul 2003 Location: Banks of the River Styx
Posts: 891
| Quote:
Quote:
Quote:
Code: SELECT
Animal,
Age,
'Dog Years' = Age * 7,
Colour
FROM
Dog
You can build SQL queries directly into an Excel spreadsheet as well, and have it requery when you need it. You could use the mysql command line utility, which can store the results into a csv file, which you could then do simple I/O on and generate your output. Finally, are you sure you're working in C++, and not 'managed C++'?
__________________ long time; /* know C? */ Unprecedented performance: Nothing ever ran this slow before. Any sufficiently advanced bug is indistinguishable from a feature. Real Programmers confuse Halloween and Christmas, because dec 25 == oct 31. The best way to accelerate an IBM is at 9.8 m/s/s. recursion (re - cur' - zhun) n. 1. (see recursion) Last edited by Cactus_Hugger; 07-16-2009 at 06:04 PM. | |||
| Cactus_Hugger is offline | |
| | #12 |
| Registered User Join Date: Jul 2009
Posts: 8
| That's the whole problem... the projects are just headers that can't be executed by their own and if I just copy the code from them into a new project, it gives me an error of something missing (tried adding the .h files in the same directory, but no luck). Also the install file says to view the corresponding Read Me file, but in there there are no install-relative info. I tried googling around but the only thing I got is how to make some changes so that it runs in Form and MFC applications and although I did those as well it just doesn't work. Any other ideas? (btw you were right, if I do get this to work, I'll be almost finished ) |
| AntV is offline | |
| | #13 | ||
| and the Hat of Guessing Join Date: Nov 2007
Posts: 8,740
| Quote:
Also, did you read the bit that says Quote:
| ||
| tabstop is offline | |
| | #14 |
| Registered User Join Date: Jul 2009
Posts: 8
| Problem is that when I try to execute the Mysql++.sln I get about the following errors saying the same thing: Cannot open or include file: 'Mysql_version.h': No such file or directory, Cannot open file: 'Mysqlpp_excommon.h': No such file or directory. (I also tried reinstalling MySQL server and include all files, but no change) Has anyone used MySQL++ and knows how to make it work on a windows platform? Update: I found a guide for installing it here done everything (exept for part 10, it says "Cannot find the path specified") and now instead of the previous "not found" errors, I get new ones for "libmysql.lib" and "libmysqlpp_d.lib" Last edited by AntV; 07-17-2009 at 09:50 AM. |
| AntV is offline | |
![]() |
| Tags |
| c++, data, database, retrieve, visual |
| Thread Tools | |
| Display Modes | |
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Reading large complicated data files | dodzy | C Programming | 16 | 05-17-2006 04:57 PM |
| accessing my com port, writing and reading data | shoobsie | C Programming | 7 | 09-16-2005 03:29 PM |
| HUGE fps jump | DavidP | Game Programming | 23 | 07-01-2004 10:36 AM |
| reading data format into program | lambs4 | C Programming | 1 | 10-23-2003 02:27 PM |
| C diamonds and perls :°) | Carlos | A Brief History of Cprogramming.com | 7 | 05-16-2003 10:19 PM |