?
Solved

Database

Posted on 1999-10-29
5
Medium Priority
?
190 Views
Last Modified: 2010-04-01
How do you connect to a database and retrieve information from a table.
0
Comment
Question by:Dugsty
5 Comments
 
LVL 1

Expert Comment

by:Ernest022699
ID: 2169794
One point?  Get real!
0
 

Expert Comment

by:tommyq
ID: 2172679
Please give more details: what Db, What connection method (ODBC, ADO, DAO etc.) and please raise the points... :-)
0
 
LVL 2

Expert Comment

by:kgreddy
ID: 2173502
You have to use SQL(Sequential query language) to do this.
You need to specify which database you are using and as
tommyg said what is the connection method you want to use.

One point is too less for this.
0
 
LVL 1

Accepted Solution

by:
Ernest022699 earned 0 total points
ID: 2177851
"SQL" stands for "Structured Query Language", not "Sequential ...".

Raise the points to something meaningful for an answer to your question.
0
 
LVL 1

Expert Comment

by:Valentin
ID: 2246010
this is a sample for mfc programming in visual c++ and odbc data source name

CDatabase db;
CODBCFieldInfo info;
if(!db.Open("scalaDB", FALSE, FALSE, "ODBC;UID=scala;PWD=statistica;"))
{
MessageBox("Open Data Base error");
}
CRecordset rs(&db);      
if(!rs.Open( CRecordset::forwardOnly, "SELECT field FROM table"))
{
MessageBox("Record set open error");
}

let me know if this help
if you need more explanation let me know
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.
Suggested Courses

589 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question