Monday, March 19, 2012

datetime in XP

I am passing in a datetime value into a extended stored procedure, and
thought I could read it into a double. its failing and I am not sure
why.
..
BYTE bType;
ULONG ulMaxLen;
ULONG ulActualLen;
BOOL isParamNull;
int inputParamIndex = 1;
srv_paraminfo(srvroc, inputParamIndex, &bType, &ulMaxLen,
&ulActualLen, NULL, &isParamNull );
BYTE* ldata = new BYTE[ulActualLen];
memset(ldata, '\0', ulActualLen);
srv_paraminfo(Proc, inputParamIndex, &bType, &ulMaxLen, &ulActualLen,
ldata, &isParamNull );
double xdate = (double)*ldata;
delete []ldata;
...
xdate should have the date, but doesn't.
ThanksI figured it out

No comments:

Post a Comment