New window api and database via C++

I am creating a windows application(not console application). I have made a window and added menu options to it. I use Dev-c++. I want to connect to the database using this C/C++ code, execute simple queries and display in my window, but constantly getting errors.
How can I get through this?

I am also thinking to try another way of including the source code of a open source database into my code. How to include it?
Last edited on
... but constantly getting errors.
It depends on the errors.

I want to connect to the database using this C/C++ code ... How can I get through this?
It depends on the database.
There are two things you have to master.

First, you need to know how to draw text strings to a window. Wouldn't you know it, but there is a Windows Api functiion for exactly that named DrawText(). This function or the easier TextOut() should be used during a WM_PAINT message.

Second, you need to know how to interface with a database. If its a reklational database such as Sql Server, Access, MySql, Oracle, etc., you can use ODBC or ADO easily in C or C++.

Do you know how to do both those things?
Thanks for suggesting @freddie1. Actually I am a newbie.

I use PostgreSql, which is an open-source RDBMS and it contains OLEDB. When I execute the connection to database, it is compiling without errors. When I am executing a simple SELECT query, it is not displaying in my window.

How to do this?
Topic archived. No new replies allowed.