c语言用ODBC访问access,编译时出错,都是头文件的错误,实在搞不明白,恳求各位大牛大虾们指教小弟!!急~~~~~~~~~~
#include <sql.h> #include <sqlext.h> #include <sqltypes.h> //#include <odbcss.h> //#include <odbcinst.h> #include <sqlucode.h> #include <stdio.h> #include <string.h> #include <conio.h> #include <stdlib.h> #include <ctype.h> #include <windows.h>
int main()
{
……………………
}
Compiling... odbc.c f:\microsoft visual studio\vc98\include\sqltypes.h(114) : error C2061: syntax error : identifier 'SQLHWND' f:\microsoft visual studio\vc98\include\sqltypes.h(114) : error C2059: syntax error : ';' f:\microsoft visual studio\vc98\include\sqltypes.h(252) : error C2061: syntax error : identifier 'DWORD' f:\microsoft visual studio\vc98\include\sqltypes.h(253) : error C2061: syntax error : identifier 'Data2' f:\microsoft visual studio\vc98\include\sqltypes.h(253) : error C2059: syntax error : ';' f:\microsoft visual studio\vc98\include\sqltypes.h(254) : error C2061: syntax error : identifier 'Data3' f:\microsoft visual studio\vc98\include\sqltypes.h(254) : error C2059: syntax error : ';' f:\microsoft visual studio\vc98\include\sqltypes.h(255) : error C2061: syntax error : identifier 'Data4' f:\microsoft visual studio\vc98\include\sqltypes.h(255) : error C2059: syntax error : ';' f:\microsoft visual studio\vc98\include\sqltypes.h(255) : error C2059: syntax error : '[' f:\microsoft visual studio\vc98\include\sqltypes.h(256) : error C2059: syntax error : '}' f:\microsoft visual studio\vc98\include\sqlext.h(1678) : error C2146: syntax error : missing ')' before identifier 'hwnd' f:\microsoft visual studio\vc98\include\sqlext.h(1678) : error C2081: 'SQLHWND' : name in formal parameter list illegal f:\microsoft visual studio\vc98\include\sqlext.h(1678) : error C2061: syntax error : identifier 'hwnd' f:\microsoft visual studio\vc98\include\sqlext.h(1678) : error C2059: syntax error : ';' f:\microsoft visual studio\vc98\include\sqlext.h(1678) : error C2059: syntax error : ',' f:\microsoft visual studio\vc98\include\sqlext.h(1684) : error C2059: syntax error : ')' f:\microsoft visual studio\vc98\include\sqlext.h(2009) : error C2143: syntax error : missing '{' before '__stdcall' f:\microsoft visual studio\vc98\include\sqlext.h(2010) : error C2143: syntax error : missing '{' before '__stdcall' f:\microsoft visual studio\vc98\include\sqlext.h(2026) : error C2143: syntax error : missing ';' before '*' f:\microsoft visual studio\vc98\include\sqlext.h(2026) : error C2059: syntax error : '*' f:\microsoft visual studio\vc98\include\sqlext.h(2027) : error C2061: syntax error : identifier 'dwFlags' f:\microsoft visual studio\vc98\include\sqlext.h(2027) : error C2059: syntax error : ';' f:\microsoft visual studio\vc98\include\sqlext.h(2029) : error C2061: syntax error : identifier 'WCHAR' f:\microsoft visual studio\vc98\include\sqlext.h(2030) : error C2143: syntax error : missing '{' before '*' f:\microsoft visual studio\vc98\include\sqlext.h(2031) : error C2059: syntax error : '}' f:\microsoft visual studio\vc98\include\sqlext.h(2033) : error C2061: syntax error : identifier 'WCHAR' f:\microsoft visual studio\vc98\include\sqlext.h(2034) : error C2143: syntax error : missing '{' before '*' f:\microsoft visual studio\vc98\include\sqlext.h(2035) : error C2059: syntax error : '}' f:\microsoft visual studio\vc98\include\sqlext.h(2037) : error C2059: syntax error : '}' f:\microsoft visual studio\vc98\include\sqlext.h(2038) : error C2143: syntax error : missing '{' before '__stdcall' f:\microsoft visual studio\vc98\include\sqlucode.h(270) : error C2146: syntax error : missing ')' before identifier 'hwnd' f:\microsoft visual studio\vc98\include\sqlucode.h(270) : error C2081: 'SQLHWND' : name in formal parameter list illegal f:\microsoft visual studio\vc98\include\sqlucode.h(270) : error C2061: syntax error : identifier 'hwnd' f:\microsoft visual studio\vc98\include\sqlucode.h(270) : error C2059: syntax error : ';' f:\microsoft visual studio\vc98\include\sqlucode.h(270) : error C2059: syntax error : ',' f:\microsoft visual studio\vc98\include\sqlucode.h(276) : error C2059: syntax error : ')' f:\microsoft visual studio\vc98\include\sqlucode.h(627) : error C2146: syntax error : missing ')' before identifier 'hwnd' f:\microsoft visual studio\vc98\include\sqlucode.h(627) : error C2081: 'SQLHWND' : name in formal parameter list illegal f:\microsoft visual studio\vc98\include\sqlucode.h(627) : error C2061: syntax error : identifier 'hwnd' f:\microsoft visual studio\vc98\include\sqlucode.h(627) : error C2059: syntax error : ';' f:\microsoft visual studio\vc98\include\sqlucode.h(627) : error C2059: syntax error : ',' f:\microsoft visual studio\vc98\include\sqlucode.h(633) : error C2059: syntax error : ')' Error executing cl.exe.
odbc.obj - 43 error(s), 0 warning(s)