dbTalk Databases Forums  

[OCI]Global namespace and OCI functions

comp.databases.oracle.misc comp.databases.oracle.misc


Discuss [OCI]Global namespace and OCI functions in the comp.databases.oracle.misc forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Herode
 
Posts: n/a

Default [OCI]Global namespace and OCI functions - 02-28-2006 , 02:08 AM






Hi gentlemen,

I wondered why, under VC++ 6, this line compiles :
OCIDateGetDate( dt, &year, &month, &day );

and not this one :
::OCIDateGetDate( dt, &year, &month, &day );

NB : the others OCI functions with the global namespace accessor "::"
compile in my code, of course.


Reply With Quote
  #2  
Old   
Andy Hassall
 
Posts: n/a

Default Re: [OCI]Global namespace and OCI functions - 02-28-2006 , 01:57 PM






On 28 Feb 2006 00:08:57 -0800, "Herode" <cbrun (AT) geomapgis (DOT) com> wrote:

Quote:
I wondered why, under VC++ 6, this line compiles :
OCIDateGetDate( dt, &year, &month, &day );

and not this one :
::OCIDateGetDate( dt, &year, &month, &day );

NB : the others OCI functions with the global namespace accessor "::"
compile in my code, of course.
Clues such as the compiler error message might help?

--
Andy Hassall :: andy (AT) andyh (DOT) co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool


Reply With Quote
  #3  
Old   
Herode
 
Posts: n/a

Default Re: Global namespace and OCI functions - 03-01-2006 , 05:05 AM



You're right... )
For ligne 155 ==
::OCIDateGetDate( dt, &year, &month, &day );

the error messages are :
D:\Dev\CPP\testOCI\TestDynaset.cpp(155) : error C2589: '{' : illegal
token on right side of '::'
D:\Dev\CPP\testOCI\TestDynaset.cpp(155) : error C2143: syntax error :
missing ';' before '::'
D:\Dev\CPP\testOCI\TestDynaset.cpp(155) : error C2143: syntax error :
missing ';' before '{'


Reply With Quote
  #4  
Old   
Andy Hassall
 
Posts: n/a

Default Re: Global namespace and OCI functions - 03-01-2006 , 01:14 PM



On 1 Mar 2006 03:05:50 -0800, "Herode" <cbrun (AT) geomapgis (DOT) com> wrote:

Quote:
You're right... )
For ligne 155 ==
::OCIDateGetDate( dt, &year, &month, &day );

the error messages are :
D:\Dev\CPP\testOCI\TestDynaset.cpp(155) : error C2589: '{' : illegal
token on right side of '::'
D:\Dev\CPP\testOCI\TestDynaset.cpp(155) : error C2143: syntax error :
missing ';' before '::'
D:\Dev\CPP\testOCI\TestDynaset.cpp(155) : error C2143: syntax error :
missing ';' before '{'
OCIDateGetDate is not a global function, it's a macro, see the definition in
oci/include/orl.h. As a result, putting "::" in front of it causes syntax
errors once it's been expanded.

--
Andy Hassall :: andy (AT) andyh (DOT) co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.