Solution: ADO SqlServer TimeStamp from _variant_t byte array in c++
- From: gkiranps@xxxxxxxxx
- Date: 7 Jan 2007 02:50:49 -0800
_variant_t vtValue;
VariantInit(&vtValue);
if (FieldTypes[i]==adBinary)
.....
....
vtValue = m_Rec->Fields->GetItem(vtIdx)->Value;
' get the size
int Count=vtValue.parray->rgsabound[0].cElements;
char st[256],TimeStamp[256]; ' Alloc to atleast (Count*2)+16.
' get the byte array ptr
unsigned char *p=(unsigned char *)vtValue.parray->pvData;
strcpy(TimeStamp,"0x");
for(i=0;i<Count;i++)
{
sprintf(st,"%02x",p[i]);
strcat(TimeStamp,st);
}
.
- Prev by Date: Re: bulk update in the database
- Next by Date: Re: Using OracleDataAdapter.Fill() with incomplete sets of tables.
- Previous by thread: Re: bulk update in the database
- Next by thread: Re: Using OracleDataAdapter.Fill() with incomplete sets of tables.
- Index(es):