Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

Problem with ODBC and Visual C++6.0

Hi,

I work with Visual C++6.0 SP5 under Windows 2000 SP2

I have theis following problem to compile my project in visual c++6.0
I want to connect to a db2 data source. If i attemp to compile my project,
the following error message is display :

------------------------
f:\progra~1\sqllib\include\sqlext.h(1676) : error C2146: syntax error : missing
';' before identifier 'SQL_API'
f:\progra~1\sqllib\include\sqlext.h(1676) : error C2501: 'SQLRETURN' : missing
storage-class or type specifiers
f:\progra~1\sqllib\include\sqlext.h(1676) : fatal error C1004: unexpected
end of file found
------------------------

Sqlext.h is'nt part of my project

Can anybody help me ?

Thanks in advance
[807 byte] By [cheickna] at [2007-11-9 18:51:49]
# 1 Re: Problem with ODBC and Visual C++6.0
Hi,

sqlext.h could be included by another file you have included. What includes to you
have? Have you had a look at sqlext.h to see what's around line 1676?

--greg

cheickna wrote:

> Hi,
>
> I work with Visual C++6.0 SP5 under Windows 2000 SP2
>
> I have theis following problem to compile my project in visual c++6.0
> I want to connect to a db2 data source. If i attemp to compile my project,
> the following error message is display :
>
> ------------------------
> f:\progra~1\sqllib\include\sqlext.h(1676) : error C2146: syntax error : missing
> ';' before identifier 'SQL_API'
> f:\progra~1\sqllib\include\sqlext.h(1676) : error C2501: 'SQLRETURN' : missing
> storage-class or type specifiers
> f:\progra~1\sqllib\include\sqlext.h(1676) : fatal error C1004: unexpected
> end of file found
> ------------------------
>
> Sqlext.h is'nt part of my project
>
> Can anybody help me ?
>
> Thanks in advance
Greg Nash at 2007-11-12 0:01:29 >
# 2 Re: Problem with ODBC and Visual C++6.0
Hi,

just rename the sqletx.h to sqlext.old and compile your source again. After
this, rename the header file again to it's old name.

best regards

Greg Nash <gnash@namoicotton.com.au> wrote:
>Hi,
>
>sqlext.h could be included by another file you have included. What includes
to you
>have? Have you had a look at sqlext.h to see what's around line 1676?
>
>--greg
>
>cheickna wrote:
>
>> Hi,
>>
>> I work with Visual C++6.0 SP5 under Windows 2000 SP2
>>
>> I have theis following problem to compile my project in visual c++6.0
>> I want to connect to a db2 data source. If i attemp to compile my project,
>> the following error message is display :
>>
>> ------------------------
>> f:\progra~1\sqllib\include\sqlext.h(1676) : error C2146: syntax error
: missing
>> ';' before identifier 'SQL_API'
>> f:\progra~1\sqllib\include\sqlext.h(1676) : error C2501: 'SQLRETURN' :
missing
>> storage-class or type specifiers
>> f:\progra~1\sqllib\include\sqlext.h(1676) : fatal error C1004: unexpected
>> end of file found
>> ------------------------
>>
>> Sqlext.h is'nt part of my project
>>
>> Can anybody help me ?
>>
>> Thanks in advance
>
Tschiplakow at 2007-11-12 0:02:29 >
# 3 Re: Problem with ODBC and Visual C++6.0
This may be your problem. Go to Tools-Options. Then click on the Directories
Tab. In the Show Directories For drop-down, make sure that it says Include
Files. Then in the list box below, make sure that you move the directory
that points to your install of DB2 to the last in the list. I believe the
reason you are getting the errors is because of the order that they are being
linked. Good luck.

Dave

Greg Nash <gnash@namoicotton.com.au> wrote:
>Hi,
>
>sqlext.h could be included by another file you have included. What includes
to you
>have? Have you had a look at sqlext.h to see what's around line 1676?
>
>--greg
>
>cheickna wrote:
>
>> Hi,
>>
>> I work with Visual C++6.0 SP5 under Windows 2000 SP2
>>
>> I have theis following problem to compile my project in visual c++6.0
>> I want to connect to a db2 data source. If i attemp to compile my project,
>> the following error message is display :
>>
>> ------------------------
>> f:\progra~1\sqllib\include\sqlext.h(1676) : error C2146: syntax error
: missing
>> ';' before identifier 'SQL_API'
>> f:\progra~1\sqllib\include\sqlext.h(1676) : error C2501: 'SQLRETURN' :
missing
>> storage-class or type specifiers
>> f:\progra~1\sqllib\include\sqlext.h(1676) : fatal error C1004: unexpected
>> end of file found
>> ------------------------
>>
>> Sqlext.h is'nt part of my project
>>
>> Can anybody help me ?
>>
>> Thanks in advance
>
Dave Taylor at 2007-11-12 0:03:34 >