Author Topic: error: unknown type name 'ULONG' when sql.h is included in "C" app  (Read 9705 times)

Offline cwolfe

  • Single posting newcomer
  • *
  • Posts: 2
I am reading "Inside ODBC" from Microsoft Press to learn how to perform SQL in my "C" application.  I am writing the first "hello world" ODBC program.  I only added the header file sql.h and compiled and I get several unknown type name errors ULONG, USHORT, PVOID, UCHAR, HWND, DWORD, WORD and BYTE.  As a second test I added, sqlext.h and compiled and I get additional errors.  How do I resolve these errors?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: error: unknown type name 'ULONG' when sql.h is included in "C" app
« Reply #1 on: January 14, 2015, 01:37:06 am »
By including the proper header.
Read the docs, search the internet or ask in a win32 api support forum.
This one is not such and you're violating the rules of it!
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline cwolfe

  • Single posting newcomer
  • *
  • Posts: 2
Re: error: unknown type name 'ULONG' when sql.h is included in "C" app
« Reply #2 on: January 14, 2015, 11:04:58 pm »
Solution:  Include windows.h before sql.h