From: | sunpeng <bluevaley(at)gmail(dot)com> |
---|---|
To: | PostgreSQL general <pgsql-general(at)postgresql(dot)org> |
Subject: | How to use ADO to insert BYTEA data? |
Date: | 2014-07-03 17:02:14 |
Message-ID: | CAOYKhLq30-_bGHVtZbJxVEQ8-hpZ6s8_GQeA4WwZmUnTjSH9yA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
I try to write this code for postgresql (for mysql working fine):
try
{
m_pRecordset->AddNew();
iTimes++;
VARIANT bitdata[3];
SAFEARRAY *psafe[3] = {NULL, NULL, NULL};
SAFEARRAYBOUND band[3];
bitdata[0].vt = VT_ARRAY | VT_UI1;
band[0].cElements = FreImgSize;
band[0].lLbound = 0;
psafe[0] = SafeArrayCreate(VT_UI1, 1, &band[0]);
for (long iSize = 0; iSize < FreImgSize; iSize++)
{
SafeArrayPutElement(psafe[0], &iSize, &pFreImg[iSize]);
}
bitdata[0].parray = psafe[0];
if (bitdata[0].parray != NULL)
{
m_pRecordset->GetFields()->GetItem("CapturePic")->AppendChunk(&bitdata[0]);
}
When calling AppendChunk error occurs.
Please help me, thks!
peng
From | Date | Subject | |
---|---|---|---|
Next Message | David Wall | 2014-07-03 17:04:12 | pg_dump slower than pg_restore |
Previous Message | John R Pierce | 2014-07-03 16:04:36 | Re: Not able to understand how to write group by |