[Oledb-dev] Provider question

Shachar Shemesh psql at shemesh.biz
Sun Apr 9 20:42:54 GMT 2006


Arvo wrote:

>Probably I've some VS settings screwed up - no errors this time, but (different) warnings again. Should I change some project settings?
>  
>
I don't think so. All warning from the previous round (well, except the
totally useless one about VC not implementing exception contracts) were
to the point and pointed to real (though quite harmless) problems with
the code.

>Started from scratch - deleted pgoledb tree, checked out from cvs, converted project, compiled - look attached file.
>  
>
I will, as soon as I have the patience to fire up my vmware again. I do
not run Windows on any real machine of mine.

>Or - can some errors caused by old postgresql source tree? this one (for postgresql-8.0.1\src\include\c.h) for sure, but others?
>Will download latest source.
>
>  
>
>>Maybe it's time to bite the bullet and upgrade after all :-(
>>    
>>
>
>Better not to upgrade, but install them side by side.
>  
>
I'll make sure I have the room on the disk.

My MSDN subscription ran out, after 2 and a half years, right before VS
2005 came out. Since I did not install VS 2002, and I hardly work on
Windows at all, I saw no immediate reason to renew it.

>------------------------------------------------------------------------
>
>e:\PGOLEDB\postgresql-8.0.1\src\include\c.h(575) : warning C4005: 'StrNCpy' : macro redefinition
>        e:\Program Files\Microsoft Visual Studio .NET\Vc7\PlatformSDK\Include\ShLwApi.h(304) : see previous definition of 'StrNCpy'
>  
>
Please don't worry about this one. It's actually, more or less, on purpose.

In debug builds I'm including some internal postgresql include files.
This allows me to see the internal Postgresql structures in the VS
debugger. This causes some harmless conflicts of definition. The include
takes place inside StdAfx.h on line 67. Feel free to comment it out if
it annoys you. This warning should not happen on Release builds.

>statreg.cpp is obsolete. Please remove it from your project.
>atlimpl.cpp is obsolete. Please remove it from your project.
>  
>
Do you have any idea what these messages mean?

>Compiling...
>TypeInfo.cpp
>e:\PGOLEDB\oledb\TypeInfo.cpp(32) : warning C4244: '=' : conversion from 'const __int64' to 'int', possible loss of data
>e:\PGOLEDB\oledb\TypeInfo.cpp(75) : warning C4244: '=' : conversion from '__int64' to 'unsigned short', possible loss of data
>e:\PGOLEDB\oledb\TypeInfo.cpp(77) : warning C4244: '=' : conversion from '__int64' to 'unsigned short', possible loss of data
>e:\PGOLEDB\oledb\TypeInfo.cpp(79) : warning C4244: '=' : conversion from '__int64' to 'unsigned short', possible loss of data
>e:\PGOLEDB\oledb\TypeInfo.cpp(80) : warning C4244: '=' : conversion from '__int64' to 'ULONG', possible loss of data
>e:\PGOLEDB\oledb\TypeInfo.cpp(112) : warning C4244: '=' : conversion from 'double' to 'Timestamp', possible loss of data
>e:\PGOLEDB\oledb\TypeInfo.cpp(155) : warning C4244: '=' : conversion from 'double' to 'Timestamp', possible loss of data
>  
>
If memory servs me right, this code was copied from Postgresql itself. I
wonder how it functions there.


I'll have a look at the rest as soon as I get a chance.


          Shachar



More information about the Oledb-devel mailing list