I have the code that compiled on Visual Studio 2008 in 32 bit mode. Now I am trying to compile the same in 64 bit mode.
Point where I am having this error is:
SDWORD temp=0;
SDWORD & readlen = (pValue?*pValue:temp);
retValue=::SQLGetData(hStatement,mCurrentCol=column,cType,actualbuff,len,&readlen);
I tried to google the error message but did not find solution that I can use. Can anyone help me with this.
Is there any way I can typecast SDWORD to SQLLEN?
The actual type for the sixth parameter is SQLGetData is SQLLEN*. MS’ documentation also uses SQLINTEGER*. Your code is treating it as SDWORD*. It’s a simple cast IF SQLLEN and SDWORD have the same underlying datatype. But if, say, SQLLEN is a 64-bit wide value, and SDWORD is 32-bits wide, then a cast won’t suffice. In that case, you could try: