Hi am trying to ues ODBC connection in c using following code.But i was not able to find the header file for SQL.H and SQLEXT.H.It was even not found in the installed Include folder.Where to find the source for these two headers or is there any site available for downloading the header file.???
Hi尝试使用以下代码在c中使用ODBC连接。但是我不能找到SQL的头文件。H和SQLEXT.H。甚至在安装的Include文件夹中也没有找到。在哪里可以找到这两个头文件的源代码,或者在哪里可以下载头文件。
#include <stdio.h>
#include <sql.h>
#include <sqlext.h>
Error is unable to find SQL.H
错误无法找到SQL.H。
2 个解决方案
#1
2
sql.h and sqlext.h is part of Windows SDK. Windows SDK is installed after installation of Visual Studio or it's possible to download Windows SDK separately - SDK is free. For example, I have these files here - it depends on SDK version:
sql。h和sqlext。h是Windows SDK的一部分。Windows SDK安装后安装Visual Studio,或者可以单独下载Windows SDK——SDK是免费的。例如,我这里有这些文件-它取决于SDK版本:
"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Include\sqlext.h"
Also check whether your C++ project settings has correct reference to Win SDK
还要检查您的c++项目设置是否正确引用了Win SDK。
#2
0
If you have Windows SDK installed under Windows 8.1 or 10, then take a look under
如果您在Windows 8.1或10下安装了Windows SDK,那么请查看下面的内容。
"C:\Program Files (x86)\Windows Kits\10\Include\..."
or
或
"C:\Program Files (x86)\Windows Kits\8.1\Include\..."
include the following:
包括以下:
#include <Windows.h>
#include <sql.h>
#include <sqlext.h>
#include <sqltypes.h>
#1
2
sql.h and sqlext.h is part of Windows SDK. Windows SDK is installed after installation of Visual Studio or it's possible to download Windows SDK separately - SDK is free. For example, I have these files here - it depends on SDK version:
sql。h和sqlext。h是Windows SDK的一部分。Windows SDK安装后安装Visual Studio,或者可以单独下载Windows SDK——SDK是免费的。例如,我这里有这些文件-它取决于SDK版本:
"C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Include\sqlext.h"
Also check whether your C++ project settings has correct reference to Win SDK
还要检查您的c++项目设置是否正确引用了Win SDK。
#2
0
If you have Windows SDK installed under Windows 8.1 or 10, then take a look under
如果您在Windows 8.1或10下安装了Windows SDK,那么请查看下面的内容。
"C:\Program Files (x86)\Windows Kits\10\Include\..."
or
或
"C:\Program Files (x86)\Windows Kits\8.1\Include\..."
include the following:
包括以下:
#include <Windows.h>
#include <sql.h>
#include <sqlext.h>
#include <sqltypes.h>