Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

VC++ Win32 Console App. with ODBC(Sql.h)etc.

Posted on 1999-01-26
2
1,029 Views
Last Modified: 2008-02-20
Dear Madam/Sir,

I had encountered a problem when I compile the Microsoft Visual C++ 6.0 Win32 Console Application with ODBC (included sql.h and sqlext.h). The problem is there are some syntax errors in the sqltypes.h
The following is operating steps:
1) Run the Visual C++ 6.0 in Microsoft Visual Studio 6.0
2) Select "File", then select "New"
3) Press "Projects"
4) Select "Win32 Console Application"
5) Fill the "Test" in field Project name, and press "OK"
6) Select A "Hello, World!" application
7) Press "Finish", and "OK"
8) Press "FileView", and open the file "Test.cpp"
9) Add the lines as follow:
        #include "sql.h"
        #include "sqlext.h"
10)Select the "Build" in main menu, and build it.

Your will find the problem. Could you help me to overcome it? My email address is csxhuang@yahoo.com
I am looking forward to hearing from you!

Thanks!!!

Xudong Huang
0
Comment
Question by:csxhuang
2 Comments
 
LVL 15

Accepted Solution

by:
Tommy Hui earned 60 total points
ID: 1185233
You need to add

#include <windows.h>

before your #include "sql.h"


0
 

Author Comment

by:csxhuang
ID: 1185234
The answer help me to overcome the problem. I am very thanks for Thui. Dear Thui, Could you give me the email address? Xudong
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Unlike C#, C++ doesn't have native support for sealing classes (so they cannot be sub-classed). At the cost of a virtual base class pointer it is possible to implement a pseudo sealing mechanism The trick is to virtually inherit from a base class…
  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
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.

860 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