What's up with SQL.H ?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

What's up with SQL.H ?

Rod Strumbel

I add the #include <sql.h> into a program to experiment with the interaction with Microsoft SQL, I added NO code

to use anything within the module yet.  Just recompiled to make sure everything I need to use it is available.

Apparently not…

 

 

The code: (Yes, this is ALL there is to the code)

#include <iostream>

#include <sql.h>

 

using namespace std;

 

int main(int argc, char **argv){

    cout << "Uh... hello?" << endl;

    }

 

 

The compile line:

 

g++.exe "C:\CPP\PROJECTS\TEST_SQL\SOURCE\main.cpp" -o "C:\CPP\PROJECTS\TEST_SQL\SOURCE\main.exe"    -I"C:\Dev-Cpp\lib\gcc\mingw32\3.4.2\include"  -I"C:\Dev-Cpp\include\c++\3.4.2\backward"  -I"C:\Dev-Cpp\include\c++\3.4.2\mingw32"  -I"C:\Dev-Cpp\include\c++\3.4.2"  -I"C:\Dev-Cpp\include"   -L"C:\Dev-Cpp\lib"

 

 

The compiler errors:

C:/Dev-Cpp/include/sqltypes.h:17: error: `ULONG' does not name a type

C:/Dev-Cpp/include/sqltypes.h:18: error: `USHORT' does not name a type

C:/Dev-Cpp/include/sqltypes.h:24: error: `PVOID' does not name a type

C:/Dev-Cpp/include/sqltypes.h:25: error: `PVOID' does not name a type

C:/Dev-Cpp/include/sqltypes.h:26: error: `PVOID' does not name a type

C:/Dev-Cpp/include/sqltypes.h:27: error: `PVOID' does not name a type

C:/Dev-Cpp/include/sqltypes.h:29: error: `UCHAR' does not name a type

C:/Dev-Cpp/include/sqltypes.h:34: error: `UDWORD' does not name a type

C:/Dev-Cpp/include/sqltypes.h:36: error: `UWORD' does not name a type

C:/Dev-Cpp/include/sqltypes.h:37: error: `PVOID' does not name a type

C:/Dev-Cpp/include/sqltypes.h:50: error: `HWND' does not name a type

C:/Dev-Cpp/include/sqltypes.h:51: error: `ULONG' does not name a type

C:/Dev-Cpp/include/sqltypes.h:71: error: `SQLCHAR' does not name a type

C:/Dev-Cpp/include/sqltypes.h:90: error: `SQLUSMALLINT' does not name a type

C:/Dev-Cpp/include/sqltypes.h:91: error: `SQLUSMALLINT' does not name a type

C:/Dev-Cpp/include/sqltypes.h:94: error: `SQLUSMALLINT' does not name a type

C:/Dev-Cpp/include/sqltypes.h:95: error: `SQLUSMALLINT' does not name a type

C:/Dev-Cpp/include/sqltypes.h:96: error: `SQLUSMALLINT' does not name a type

C:/Dev-Cpp/include/sqltypes.h:100: error: `SQLUSMALLINT' does not name a type

C:/Dev-Cpp/include/sqltypes.h:101: error: `SQLUSMALLINT' does not name a type

C:/Dev-Cpp/include/sqltypes.h:102: error: `SQLUSMALLINT' does not name a type

C:/Dev-Cpp/include/sqltypes.h:103: error: `SQLUSMALLINT' does not name a type

C:/Dev-Cpp/include/sqltypes.h:104: error: `SQLUSMALLINT' does not name a type

C:/Dev-Cpp/include/sqltypes.h:105: error: `SQLUINTEGER' does not name a type

C:/Dev-Cpp/include/sqltypes.h:118: error: `SQLUINTEGER' does not name a type

C:/Dev-Cpp/include/sqltypes.h:119: error: `SQLUINTEGER' does not name a type

C:/Dev-Cpp/include/sqltypes.h:122: error: `SQLUINTEGER' does not name a type

C:/Dev-Cpp/include/sqltypes.h:123: error: `SQLUINTEGER' does not name a type

C:/Dev-Cpp/include/sqltypes.h:124: error: `SQLUINTEGER' does not name a type

C:/Dev-Cpp/include/sqltypes.h:125: error: `SQLUINTEGER' does not name a type

C:/Dev-Cpp/include/sqltypes.h:126: error: `SQLUINTEGER' does not name a type

C:/Dev-Cpp/include/sqltypes.h:138: error: `SQLCHAR' does not name a type

C:/Dev-Cpp/include/sqltypes.h:140: error: `SQLCHAR' does not name a type

C:/Dev-Cpp/include/sqltypes.h:141: error: `SQLCHAR' does not name a type

C:/Dev-Cpp/include/sqltypes.h:154: error: `DWORD' does not name a type

C:/Dev-Cpp/include/sqltypes.h:155: error: `WORD' does not name a type

C:/Dev-Cpp/include/sqltypes.h:156: error: `WORD' does not name a type

C:/Dev-Cpp/include/sqltypes.h:157: error: `BYTE' does not name a type

 

 

C:/Dev-Cpp/include/sql.h:346: error: `SQLUSMALLINT' has not been declared

C:/Dev-Cpp/include/sql.h:346: error: `SQLPOINTER' has not been declared

C:/Dev-Cpp/include/sql.h:348: error: `SQLCHAR' has not been declared

C:/Dev-Cpp/include/sql.h:348: error: `SQLCHAR' has not been declared

C:/Dev-Cpp/include/sql.h:348: error: `SQLCHAR' has not been declared

C:/Dev-Cpp/include/sql.h:349: error: `SQLUSMALLINT' has not been declared

C:/Dev-Cpp/include/sql.h:349: error: `SQLCHAR' has not been declared

C:/Dev-Cpp/include/sql.h:349: error: `SQLUINTEGER' has not been declared

C:/Dev-Cpp/include/sql.h:351: error: `SQLCHAR' has not been declared

C:/Dev-Cpp/include/sql.h:351: error: `SQLCHAR' has not been declared

C:/Dev-Cpp/include/sql.h:352: error: `SQLCHAR' has not been declared

C:/Dev-Cpp/include/sql.h:357: error: `SQLUSMALLINT' has not been declared

C:/Dev-Cpp/include/sql.h:358: error: `SQLCHAR' has not been declared

C:/Dev-Cpp/include/sql.h:360: error: `SQLCHAR' has not been declared

C:/Dev-Cpp/include/sql.h:362: error: `SQLCHAR' has not been declared

C:/Dev-Cpp/include/sql.h:363: error: `SQLUSMALLINT' has not been declared

C:/Dev-Cpp/include/sql.h:364: error: `SQLUSMALLINT' has not been declared

C:/Dev-Cpp/include/sql.h:364: error: `SQLUINTEGER' has not been declared

C:/Dev-Cpp/include/sql.h:364: error: `SQLPOINTER' has not been declared

C:/Dev-Cpp/include/sql.h:365: error: `SQLCHAR' has not been declared

C:/Dev-Cpp/include/sql.h:365: error: `SQLCHAR' has not been declared

C:/Dev-Cpp/include/sql.h:365: error: `SQLCHAR' has not been declared

C:/Dev-Cpp/include/sql.h:365: error: `SQLCHAR' has not been declared

C:/Dev-Cpp/include/sql.h:366: error: `SQLUSMALLINT' has not been declared

C:/Dev-Cpp/include/sql.h:366: error: `SQLPOINTER' has not been declared

C:/Dev-Cpp/include/sql.h:367: error: `SQLUSMALLINT' has not been declared

C:/Dev-Cpp/include/sql.h:367: error: `SQLPOINTER' has not been declared

C:/Dev-Cpp/include/sql.h:368: error: `SQLUSMALLINT' has not been declared

C:/Dev-Cpp/include/sql.h:368: error: `SQLUSMALLINT' has not been declared

C:/Dev-Cpp/include/sql.h:369: error: `SQLUSMALLINT' has not been declared

C:/Dev-Cpp/include/sql.h:369: error: `SQLPOINTER' has not been declared

C:/Dev-Cpp/include/sql.h:370: error: `SQLUSMALLINT' has not been declared

C:/Dev-Cpp/include/sql.h:370: error: `SQLPOINTER' has not been declared

C:/Dev-Cpp/include/sql.h:372: error: `SQLPOINTER' has not been declared

C:/Dev-Cpp/include/sql.h:373: error: `SQLPOINTER' has not been declared

C:/Dev-Cpp/include/sql.h:374: error: `SQLUSMALLINT' has not been declared

C:/Dev-Cpp/include/sql.h:374: error: `SQLUINTEGER' has not been declared

C:/Dev-Cpp/include/sql.h:375: error: `SQLUSMALLINT' has not been declared

C:/Dev-Cpp/include/sql.h:375: error: `SQLUINTEGER' has not been declared

C:/Dev-Cpp/include/sql.h:376: error: `SQLUSMALLINT' has not been declared

C:/Dev-Cpp/include/sql.h:376: error: `SQLCHAR' has not been declared

C:/Dev-Cpp/include/sql.h:376: error: `SQLCHAR' has not been declared

C:/Dev-Cpp/include/sql.h:376: error: `SQLCHAR' has not been declared

C:/Dev-Cpp/include/sql.h:376: error: `SQLUSMALLINT' has not been declared

C:/Dev-Cpp/include/sql.h:376: error: `SQLUSMALLINT' has not been declared

C:/Dev-Cpp/include/sql.h:377: error: `SQLCHAR' has not been declared

C:/Dev-Cpp/include/sql.h:377: error: `SQLCHAR' has not been declared

C:/Dev-Cpp/include/sql.h:377: error: `SQLCHAR' has not been declared

C:/Dev-Cpp/include/sql.h:377: error: `SQLUSMALLINT' has not been declared

C:/Dev-Cpp/include/sql.h:377: error: `SQLUSMALLINT' has not been declared

C:/Dev-Cpp/include/sql.h:378: error: `SQLCHAR' has not been declared

C:/Dev-Cpp/include/sql.h:378: error: `SQLCHAR' has not been declared

C:/Dev-Cpp/include/sql.h:378: error: `SQLCHAR' has not been declared

C:/Dev-Cpp/include/sql.h:378: error: `SQLCHAR' has not been declared

C:/Dev-Cpp/include/sql.h:379: error: `SQLUSMALLINT' has not been declared

C:/Dev-Cpp/include/sql.h:379: error: `SQLCHAR' has not been declared

C:/Dev-Cpp/include/sql.h:379: error: `SQLCHAR' has not been declared

C:/Dev-Cpp/include/sql.h:382: error: `SQLUSMALLINT' has not been declared

C:/Dev-Cpp/include/sql.h:382: error: `SQLUINTEGER' has not been declared

C:/Dev-Cpp/include/sql.h:382: error: `SQLPOINTER' has not been declared

C:/Dev-Cpp/include/sql.h:384: error: `SQLUSMALLINT' has not been declared

C:/Dev-Cpp/include/sql.h:384: error: `SQLUSMALLINT' has not been declared

C:/Dev-Cpp/include/sql.h:384: error: `SQLPOINTER' has not been declared

C:/Dev-Cpp/include/sql.h:384: error: `SQLPOINTER' has not been declared

C:/Dev-Cpp/include/sql.h:389: error: `SQLPOINTER' has not been declared

C:/Dev-Cpp/include/sql.h:390: error: `SQLPOINTER' has not been declared

C:/Dev-Cpp/include/sql.h:391: error: `SQLCHAR' has not been declared

C:/Dev-Cpp/include/sql.h:393: error: `SQLPOINTER' has not been declared

C:/Dev-Cpp/include/sql.h:394: error: `SQLCHAR' has not been declared

C:/Dev-Cpp/include/sql.h:394: error: `SQLCHAR' has not been declared

C:/Dev-Cpp/include/sql.h:395: error: `SQLPOINTER' has not been declared

C:/Dev-Cpp/include/sql.h:396: error: `SQLPOINTER' has not been declared

C:/Dev-Cpp/include/sql.h:397: error: `SQLPOINTER' has not been declared

C:/Dev-Cpp/include/sql.h:398: error: `SQLPOINTER' has not been declared

C:/Dev-Cpp/include/sql.h:400: error: `SQLPOINTER' has not been declared

C:/Dev-Cpp/include/sql.h:401: error: `SQLPOINTER' has not been declared

C:/Dev-Cpp/include/sql.h:402: error: `SQLPOINTER' has not been declared

 

(errors are as reported by Bloodshed dev-c++)

 

 

Just on a whim, tried #include <stddef.h> too, and the errors

still all appear.

 

Any ideas?

 

Also, does anyone have a simple sample program of using MingW to

talk to a Microsoft SQL DB?

 

 

Thanks in advance,

 

 

Rod


Design • Installation • Support

TOSHIBA Digital and IP Telephone Systems

T-1, DSL, Local Lines, Voice Mail, Long Distance, Internet Networks

 

The information contained in this e-mail is intended only for the individual or entity to whom it is addressed.   Its contents (including any attachments) may contain confidential and/or privileged information.  If you are not an intended recipient you must not use, disclose, disseminate, copy or print its contents.  If you receive this e-mail in error, please notify the sender by reply e-mail and delete and destroy the message.

Reply | Threaded
Open this post in threaded view
|

RE: What's up with SQL.H ?

Neil Brown-2
> I add the #include <sql.h> into a program to experiment with the
> interaction with Microsoft SQL, I added NO code
>
> to use anything within the module yet.  Just recompiled to make sure
> everything I need to use it is available.
>
> Apparently not...
>

At a guess, #include <windows.h> first.  This invariably seems to be the
solution to problems involving the Windows types.  I could be wrong
though.



-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
MinGW-users mailing list
[hidden email]

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Reply | Threaded
Open this post in threaded view
|

Re: What's up with SQL.H ?

Jonathan Wilson
In reply to this post by Rod Strumbel
mabie if you put #include <windows.h> before the #include <sql.h>, it might
work...

The microsoft version of sql.h actually says "preconditions: #include
"windows.h"" so MingW is being correct here :)




-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
MinGW-users mailing list
[hidden email]

You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users