Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

problems with sql.h and sqlext.h

Posted on 2003-03-09
6
Medium Priority
?
457 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
  • 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
When you discover the power of the R programming language, you are going to wonder how you ever lived without it! Learn why the language merits a place in your programming arsenal.
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…
Simple Linear Regression

578 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