Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help!!! How to access sql in visual c++

Status
Not open for further replies.

newbie123

Technical User
Jul 14, 2002
5
US
i am trying to do a search engine using visual c++, when i type in a name the program will use the name and check with the sql and return the person's information(eg.telephone)
Question
1. how to i initialize the sql driver
2. what are the commands to access the sql
3. how to return the information
 
MFC has two classes (CDatabase & CRecordset) that you can use to "get at" SQL databases.

You need to create a CDatabase object connected to your ODBC driver & then create CRecordset-derived classes for your tables.

You will need a ODBC driver for your database. Spencer Window (not a joke name)
spencer.window@eastmidlandcomputers.ltd.uk
 
CDAORecordset does not require ODBC if you choose to go that route.

Matt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top