473,387 Members | 1,493 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

sqltypes.h compile error?

Hi all!
I used google, but I found nothing.
I have got smiple code:

#include <sql.h>
int main()
{
}

when I compiled this in Borland C++ 5.5.1 for Win32 Copyright (c) 1993,
2000 Borland, i receive errors:
Error E2139 c:\Program Files\Borland\Bcc55\include\sqltypes.h 274:
Declaration missing ;
Error E2139 c:\Program Files\Borland\Bcc55\include\sqltypes.h 275:
Declaration missing ;
Error E2238 c:\Program Files\Borland\Bcc55\include\sqltypes.h 276:
Multiple declaration for 'WORD'
Error E2344 c:\Program Files\Borland\Bcc55\include\sqltypes.h 275:
Earlier declaration of 'WORD'
Error E2139 c:\Program Files\Borland\Bcc55\include\sqltypes.h 276:
Declaration missing ;
Error E2139 c:\Program Files\Borland\Bcc55\include\sqltypes.h 277:
Declaration missing ;
Warning W8070 why.c 5: Function should return a value in function main
*** 6 errors in Compile ***

Are they errors in sqltypes.h ?

Any ideas?

greetings
Grzesiek

change -> grzesiocz
Nov 12 '05 #1
8 5815
Vavel wrote:
Hi all!
I used google, but I found nothing.
I have got smiple code:

#include <sql.h>
int main()
{
}

when I compiled this in Borland C++ 5.5.1 for Win32 Copyright (c) 1993,
2000 Borland, i receive errors:
Error E2139 c:\Program Files\Borland\Bcc55\include\sqltypes.h 274:
Declaration missing ;
Error E2139 c:\Program Files\Borland\Bcc55\include\sqltypes.h 275:
Declaration missing ;
Error E2238 c:\Program Files\Borland\Bcc55\include\sqltypes.h 276:
Multiple declaration for 'WORD'
Error E2344 c:\Program Files\Borland\Bcc55\include\sqltypes.h 275:
Earlier declaration of 'WORD'
Error E2139 c:\Program Files\Borland\Bcc55\include\sqltypes.h 276:
Declaration missing ;
Error E2139 c:\Program Files\Borland\Bcc55\include\sqltypes.h 277:
Declaration missing ;
Warning W8070 why.c 5: Function should return a value in function main
*** 6 errors in Compile ***

Are they errors in sqltypes.h ?


I'd say yes. Apparently the header file is not self-containing and you need
to include some other header files first.

But you should really ask Borland and not IBM because you are trying to
compile a header file that comes with "Bcc55" and not one that came with
DB2 (see the path shown in the error messages).

--
Knut Stolze
Information Integration
IBM Germany / University of Jena
Nov 12 '05 #2
Hi!
Thanks to your reply.
But you should really ask Borland and not IBM because you are trying to
compile a header file that comes with "Bcc55" and not one that came with
DB2 (see the path shown in the error messages).


I know that it is NTG but... I want to execute some instructions that is
used to adding audio and image to ibm db2, so I wrote it here...

Instructions are following:

EXEC SQL BEGIN DECLARE SECTION;
long hvInt_Stor;
long hvExt_Stor;
EXEC SQL END DECLARE SECTION;
hvInt_Stor = MMDB_STORAGE_TYPE_INTERNAL;
hvExt_Stor = MMDB_STORAGE_TYPE_EXTERNAL;
EXEC SQL INSERT INTO EMPLOYEE VALUES(
'128557', /*id*/
'Anita Jones', /*name*/
DB2IMAGE( /*Image Extender UDF*/
CURRENT SERVER, /*database server name in*/
/CURRENT SERVER register*/
'/employee/images/ajones.bmp' /*image source file*/
'ASIS', /*keep the image format*/
:hvInt_Stor, /*store image in DB as BLOB*/
'Anita''s picture'), /*comment*/
DB2AUDIO( /*Audio Extender UDF*/
CURRENT SERVER, /*database server name in*/
/*CURRENT SERVER register*/
'/employee/sounds/ajones.wav', /*audio source file*/
'WAVE', /* audio format */
:hvExt_Stor, /*retain content in server file*/
'Anita''s voice') /*comment*/
);

so I have used Google and I've found
http://tinyurl.com/4rc3b
but if I write like this
#include <stdio.h>
#include <stdlib.h>
#include "sql.h"
main()
{
}
I would receive the same error :-(
So what to do?Other language?other compilator or other way?

Vavel
Nov 12 '05 #3
Hi!
Thanks to your reply.
But you should really ask Borland and not IBM because you are trying to
compile a header file that comes with "Bcc55" and not one that came with
DB2 (see the path shown in the error messages).


I know that it is NTG but... I want to execute some instructions that is
used to adding audio and image to ibm db2, so I wrote it here...

Instructions are following:

EXEC SQL BEGIN DECLARE SECTION;
long hvInt_Stor;
long hvExt_Stor;
EXEC SQL END DECLARE SECTION;
hvInt_Stor = MMDB_STORAGE_TYPE_INTERNAL;
hvExt_Stor = MMDB_STORAGE_TYPE_EXTERNAL;
EXEC SQL INSERT INTO EMPLOYEE VALUES(
'128557', /*id*/
'Anita Jones', /*name*/
DB2IMAGE( /*Image Extender UDF*/
CURRENT SERVER, /*database server name in*/
/CURRENT SERVER register*/
'/employee/images/ajones.bmp' /*image source file*/
'ASIS', /*keep the image format*/
:hvInt_Stor, /*store image in DB as BLOB*/
'Anita''s picture'), /*comment*/
DB2AUDIO( /*Audio Extender UDF*/
CURRENT SERVER, /*database server name in*/
/*CURRENT SERVER register*/
'/employee/sounds/ajones.wav', /*audio source file*/
'WAVE', /* audio format */
:hvExt_Stor, /*retain content in server file*/
'Anita''s voice') /*comment*/
);

so I have used Google and I've found
http://tinyurl.com/4rc3b
but if I write like this
#include <stdio.h>
#include <stdlib.h>
#include "sql.h"
main()
{
/* my instructions*/
}
I would receive the same error :-(
So what to do?Other language?other compilator or other way?

Vavel

Nov 12 '05 #4
In article <cs**********@inews.gazeta.pl>, Vavel (ch****@poczta.fm)
says...
}
I would receive the same error :-(
So what to do?Other language?other compilator or other way?

Vavel


My guess is that you need to put the db2 include directory in front
of the bcc55 include directory when compiling.
Nov 12 '05 #5
Vavel wrote:
But you should really ask Borland and not IBM because you are trying to
compile a header file that comes with "Bcc55" and not one that came with
DB2 (see the path shown in the error messages).


I know that it is NTG but... I want to execute some instructions that is
used to adding audio and image to ibm db2, so I wrote it here...

Instructions are following:

EXEC SQL BEGIN DECLARE SECTION;
long hvInt_Stor;
long hvExt_Stor;
EXEC SQL END DECLARE SECTION;
hvInt_Stor = MMDB_STORAGE_TYPE_INTERNAL;
hvExt_Stor = MMDB_STORAGE_TYPE_EXTERNAL;
EXEC SQL INSERT INTO EMPLOYEE VALUES(
'128557', /*id*/
'Anita Jones', /*name*/
DB2IMAGE( /*Image Extender UDF*/
CURRENT SERVER, /*database server name in*/
/CURRENT SERVER register*/
'/employee/images/ajones.bmp' /*image source file*/
'ASIS', /*keep the image format*/
:hvInt_Stor, /*store image in DB as BLOB*/
'Anita''s picture'), /*comment*/
DB2AUDIO( /*Audio Extender UDF*/
CURRENT SERVER, /*database server name in*/
/*CURRENT SERVER register*/
'/employee/sounds/ajones.wav', /*audio source file*/
'WAVE', /* audio format */
:hvExt_Stor, /*retain content in server file*/
'Anita''s voice') /*comment*/
);

so I have used Google and I've found
http://tinyurl.com/4rc3b
but if I write like this
#include <stdio.h>
#include <stdlib.h>
#include "sql.h"
main()
{
/* my instructions*/
}
I would receive the same error :-(
So what to do?Other language?other compilator or other way?


You are also getting the errors from the "bcc55" path? Then you'll have to
make sure that the DB2 header file is picked up by your compiler and not
the Borland one.

The "sql.h" says (usually) that the compiler will first look in all the
directories that you specified via the "-I" compiler option to find the
necessary header files, whereas <sql.h> would first search in the
system/compiler's directories. Did you specify the
proper ..../sqllib/include/ directory via -I for your compile options?

--
Knut Stolze
Information Integration
IBM Germany / University of Jena
Nov 12 '05 #6
Knut Stolze wrote:
You are also getting the errors from the "bcc55" path? Yes
Then you'll have to
make sure that the DB2 header file is picked up by your compiler and not
the Borland one.

Ok. So now I compile using IBM libraries and I've got another errors:

Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
why.c:
Error E2176 C:\Program Files\IBM\SQLLIB\include\sqlsystm.h 89: Too many
types in declaration
Error E2176 C:\Program Files\IBM\SQLLIB\include\sqlsystm.h 90: Too many
types in declaration
Warning W8070 why.c 5: Function should return a value in function main
*** 2 errors in Compile ***

Instructions are following:
#include "sql.h"
int main()
{
}

I don't know what to do. How to make some sql instructions inside
programme wrote in c language?My target is: to add Audio Voice and Video
to IBM DB2 using AIV extenders...

greetings
Vavel
Nov 12 '05 #7
Vavel wrote:
Knut Stolze wrote:
You are also getting the errors from the "bcc55" path?

Yes
Then you'll have to
make sure that the DB2 header file is picked up by your compiler and not
the Borland one.

Ok. So now I compile using IBM libraries and I've got another errors:

Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
why.c:
Error E2176 C:\Program Files\IBM\SQLLIB\include\sqlsystm.h 89: Too many
types in declaration
Error E2176 C:\Program Files\IBM\SQLLIB\include\sqlsystm.h 90: Too many
types in declaration
Warning W8070 why.c 5: Function should return a value in function main
*** 2 errors in Compile ***


If I look at my version of sqlsystm.h (V8.2 FP7), I see this close to line
90:

#ifndef SQL_BIGINT_TYPE
#ifdef db2Is64bit
#define SQL_BIGINT_TYPE long
#else
#define SQL_BIGINT_TYPE long long
#endif
#endif
#ifndef SQL_BIGUINT_TYPE
#ifdef db2Is64bit
#define SQL_BIGUINT_TYPE unsigned long
#else
#define SQL_BIGUINT_TYPE unsigned long long
#endif
#endif

typedef SQL_BIGINT_TYPE sqlint64;
typedef SQL_BIGUINT_TYPE sqluint64;
My guess would be that your compiler is a bit outdated and cannot handle the
data type "long long".

--
Knut Stolze
Information Integration
IBM Germany / University of Jena
Nov 12 '05 #8
Knut Stolze wrote:
My guess would be that your compiler is a bit outdated and cannot handle the
data type "long long".

Thanks for help!
I'll try to use Micorosft Visual C++ ver.6 Maybe this sompiler will cope
with my problem.
Thank you once again.
Vavel
Nov 12 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Mike Albanese | last post by:
I am building an ASP.Net application with VB.Net. I have several date fields in my form and some of them are optional. If ther is no data in the form field i set the sql parameter to dbnull.value....
5
by: Carmine Cairo | last post by:
Hi, I'm working on a project and today I've note a little problem during the compile fase. Here a little piece of code: // 1st version welldone = 0; size = p->getSize(); backbone = new...
5
by: Brice Prunier | last post by:
Here under 4 schemas i'm working with ( it may be long: sorry...) The context is the following : Resident.xsd imports Person.xsd and includes Common.xsd ( anonimous schema: no TargetNamespace )...
10
by: Chris LaJoie | last post by:
Our company has been developing a program in C# for some time now, and we haven't had any problems with it, but just last night something cropped up that has me, and everyone else, stumped. I...
6
by: Thomas Connolly | last post by:
I have 2 pages referencing the same codebehind file in my project. Originally the pages referenced separate code behind files. Once I changed the reference to the same file, everything worked...
9
by: ThunderMusic | last post by:
Hi, I'd like to create a compile time error in my class... maybe there's a way already built in in the framework so I can achieve what I want... I have 2 constructors in my class. One of them...
4
by: tony | last post by:
Hello! My question is about calling this method CollectData below but I get a compile error that I shouldn't have because the type parameter is correct. The compile error is the following:...
2
by: BruceWho | last post by:
I downloaded boost1.35.0 and built it with following command: bjam --toolset=msvc-7.1 --variant=release --threading=multi -- link=shared --with-system stage and it failed to compile, error...
3
by: ishanisircar | last post by:
Hi all, I am using a Gridview which displays a calendar. when i click on the calendar, the date should be inserted in my database. but instead i get this error. ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.