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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CDatabase/CRecordSet in MFC console app

Status
Not open for further replies.

hzt0qb

Programmer
Aug 13, 2001
3
ZA
I need to get information from a MSSQL server from a MFC console app.
Do I need to use CDataBase and CRecordSet? how do they (if at all) tie up together.
I need to get a single field based on a "select [field] where [field] like '[var]' and [field] like '[var]'".

~Thanks
me
 
CDatabase db;
db.open("driver={SQL Server};server={servername};uid={userID};pwd={password};database={dbname}");
CRecordset rcs(&db);
rcs.Open(
AFX_DB_USE_DEFAULT_TYPE,
"select * from ..."
);
Ion Filipski
1c.bmp


filipski@excite.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top