Archived

This topic is now archived and is closed to further replies.

bioagentX

If you're familiar with database programming...

Recommended Posts

I''m trying to learn some SQL, and I''ve looked up some tutorials on the subject, and I''m getting results regarding the syntax of the language, but I''m having a simple, yet exstremely frustrating problem. I don''t know where to paste the SQL code in order to see the results of my Query commands. I have a database, and now I want to work with it, but I don''t know how to execute the code I use. I''m not expecting too many people to know much about this topic, being as that its not the most interesting programming topic, but if anyone can give me some advice I''d be grateful. Thanks in Advance, --BioX

Share this post


Link to post
Share on other sites
We need more information. For example, what type of db? MySQL, Oracle maybe?

Most database engines have admin programs, for example MS Access. For MySQL, many open-source programs are available.
In addition, most db systems have standard programming interfaces, such as ODBC.
In these programs and/or interfaces, you input the query and out comes the result.

-Nik

EDIT: By the way, databases are very widely known by most programmers - if one has programmed anything commercial other than games (not excluding games, though), one has very probably used some dbs.

[edited by - Nik02 on January 24, 2004 12:45:47 PM]

Share this post


Link to post
Share on other sites
quote:
Original post by bioagentX
I''m trying to learn some SQL, and I''ve looked up some tutorials on the subject, and I''m getting results regarding the syntax of the language, but I''m having a simple, yet exstremely frustrating problem. I don''t know where to paste the SQL code in order to see the results of my Query commands. I have a database, and now I want to work with it, but I don''t know how to execute the code I use. I''m not expecting too many people to know much about this topic, being as that its not the most interesting programming topic, but if anyone can give me some advice I''d be grateful.

Thanks in Advance,

--BioX


You have to esatblish a connection to the database through an API or interface layer (such as ODBC mentioned above).

If you are using VC++ 6, simply create a MFC SDI (or MDI) application with database support and it will ask you to specfiy the database you want.

Another way is to create a MFC supported application and Use the CRecordSet, CDatabase, etc.. classes to establish a connection and query a recordset from the database.

Another solution is to google the web for an API library or custom class set.

Also, look into SQLXML http://www.sqlxml.org/ for a standard database format

Share this post


Link to post
Share on other sites
These guys have some really good forums for database stuff. It's mostly relating to php, but they have a forum dedicated to databases (it's even called "Databases"). Anyway, I have gotten a lot of help from that site. You might get more help about SQL there than here (maybe, maybe not).

What do you want to do with this database? Are you trying to make a webpage, or use this in an application?

[edited by - Mr Grinch on January 24, 2004 4:39:25 PM]

Share this post


Link to post
Share on other sites
your database will almost always come with a client program. read the readme or the docs that came with your database when you downloaded it, or go to the site and read the docs there. i guarantee that the database docs have a section called "Connecting to your database". mySQL has amazing documentation and it was a matter of about 1 hour before i was populating my database and controlling it with the client software. about another 4 hours before i had my first PHP app and maybe a day before i had a c-app doing everything.

so yeah, just RTFD

-me

Share this post


Link to post
Share on other sites