?
Solved

problems with sql.h and sqlext.h

Posted on 2003-03-09
6
Medium Priority
?
448 Views
Last Modified: 2009-07-29
is there some seeting i need to adjust when useing these files?  whenever i include them i get errors

Compiling...
main.cpp
e:\microsoft visual studio\vc98\include\sqltypes.h(36) : warning C4091: 'typedef ' : ignored on left of 'unsigned char' when no variable is declared
e:\microsoft visual studio\vc98\include\sqltypes.h(36) : error C2143: syntax error : missing ';' before 'constant'
e:\microsoft visual studio\vc98\include\sqltypes.h(36) : fatal error C1004: unexpected end of file found
Error executing cl.exe.

processLogsV2.exe - 2 error(s), 1 warning(s)
0
Comment
Question by:meyerc74
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
6 Comments
 
LVL 3

Expert Comment

by:Nosfedra
ID: 8098334
Did you included <Windows.h> to gain access to windows basic types (LONG, BYTE, HANDLE etc...)?


0
 
LVL 1

Author Comment

by:meyerc74
ID: 8098401
yes.....here are all my declarations:

#define DBNTWIN32

#include <atlbase.h>
#include <stdlib.h>
#include <string.h>
#include <sqlfront.h>
#include <sqldb.h>
#include <ole2.h>
#include <stdio.h>
#include <conio.h>
#include <time.h>
#include <sys/types.h>
#include <sys/timeb.h>
#include <windows.h>

const char *AUTH_ERROR_TEXT[] = {"SQLAllocEnv Failed","SQLAllocConnect Failed",
          "SQLConnect Failed","SQLAllocStmt Failed",
          "SQLExecDirect Failed"};

//custom function definitions
#include "processWebLogs.h"
#include "e:\Microsoft Visual Studio\VC98\Include\sql.h"
#include "e:\Microsoft Visual Studio\VC98\Include\sqlext.h"
0
 
LVL 3

Accepted Solution

by:
Nosfedra earned 100 total points
ID: 8098441
You have a bit of inconsistency there:
#include <sqlfront.h>
#include <sqldb.h>

... you should include the windows header BEFORE these two too...
I'm not sure, but wouldn't you get about the same errors if you remove the "Sql.h" and sqlext.h header includes?
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
LVL 1

Author Comment

by:meyerc74
ID: 8098651
actually the sqlfront and sqldb libs are there for my existing sql connection....but it is currently making the connection, executing the query, and then closing the connection, i want to change this as i am preforming close to 60k queries on each execution.  unfortunetly, i have been unable to seperate out the connection and execution task...but i can do it with the other libs( sql.h, sqlext.h )....i just don't understand why i am getting the syntax error, which specifically references sql.h.....the prog works when the following two lines are comment out:

#include "e:\Microsoft Visual Studio\VC98\Include\sql.h"
#include "e:\Microsoft Visual Studio\VC98\Include\sqlext.h"
0
 
LVL 1

Author Comment

by:meyerc74
ID: 8106295
figured it out...there is evidently some kind of problem with the computer i was using
0
 
LVL 1

Author Comment

by:meyerc74
ID: 8106309
so Nosfedra  can have the points for attempting to help
0

Featured Post

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
Progress

764 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