?
Solved

Database connection

Posted on 2000-01-19
1
Medium Priority
?
202 Views
Last Modified: 2013-11-20
I want to call a dsn and make a query
select * from tablename

Please some code would help me.
How i can solve my problem.
0
Comment
Question by:malik_mumtaz
1 Comment
 
LVL 1

Accepted Solution

by:
RAVID earned 40 total points
ID: 2370171
hi,
try this out

CDatabase db;
db.Open("DSN name",FALSE,FALSE,"ODBC",TRUE);

db.ExecuteSQL("SELECT * FROM TABLENAME");


hope this helps
Cheers
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
How to fix display issue, screen flickering issue when I plug in power cord to the machine. Before I start explaining the solution lets check out once the issue how it looks like after I connect the power cord. most of you also have faced this…
Suggested Courses

593 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