Solved

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

Posted on 1999-01-26
2
997 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
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 learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

760 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now