BUG #5194: fire IDispatch Error #3015 when run PutCollect() in ADO

Поиск
Список
Период
Сортировка
От goldenhawking
Тема BUG #5194: fire IDispatch Error #3015 when run PutCollect() in ADO
Дата
Msg-id 200911170526.nAH5QUjl001669@wwwmaster.postgresql.org
обсуждение исходный текст
Ответы Re: BUG #5194: fire IDispatch Error #3015 when run PutCollect() in ADO  (Hiroshi Inoue <inoue@tpf.co.jp>)
Список pgsql-bugs
The following bug has been logged online:

Bug reference:      5194
Logged by:          goldenhawking
Email address:      goldenhawking@vip.163.com
PostgreSQL version: 8.4.1
Operating system:   Ubuntu 9.10 accessed by Vista Home basic
Description:        fire IDispatch Error #3015 when run PutCollect() in ADO
Details:

I have to convert our group's code from MySQL to pgSQL , this project was
built and tested first under MS-Access 2003, then to MY-SQL 5.0, 5.1, and
now they want me to convert it to pgSQL because some large table need to be
divided into sub tables, pg is a good chioce.
the pg Server is inited in Ubuntu 9.10, testing tables has been created very
simple(I'm a beginner in pgSQL),
sindex varchar (24)(PK)
strname varchar (24)
sage integer
spicture bytea
coded as UTF-8 (to hold asian chars)

the client program runs on MS Vista Home, built by MSVC2008. because this
project is first for MS Access 2003, All DB opers are coded as ADo-Record
set.

I use pgODBC 8.4.00100,has connection string like:
"Driver={PostgreSQL
Unicode};Server=localhost;Port=5432;Database=test;Uid=postgres;Pwd=XXXX;Byte
aAsLongVarBinary=1;ReadOnly=0;"

and then I open a connection as

m_pConnection->CursorLocation = adUseClient;
m_pConnection->ConnectionTimeout = 15;
m_pConnection->Open(m_pstrConn,"","",adModeUnknown);

open the recode set like
pstrSQL = _T("select * from student");
HRESULT hr =
    m_pRecordset->Open(pstrSQL,_variant_t((IDispatch
*)m_pConnection,true),            adOpenDynamic,adLockPessimistic,adCmdText);

and insert first new item

m_pRecordset->AddNew();
m_pRecordset->PutCollect(_T("sindex"),_bstr_t(strIndex));
...

when the debugger runs on
m_pRecordset->PutCollect(_T("sindex"),_...

it throws an com error that tells me "Mulit-step oper error, please check
the state value for each step "(Translated by my self from asian language)
the errmsg: Idispatch error #3015

I just changes the connection str to mysql, access, mssql, my code runs
well, but this exception continues occure in pgSQL, I googled for a whole
day get few help.

please ,please help me! I can insert the item in psql, and in ado with
"sprintf(sql,"insert into student(...""
 however, our code has a huge amount of "AddItem,Update...",I have no time
to convert all of them to insert!
please!

В списке pgsql-bugs по дате отправления:

Предыдущее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Multixact and prepared transactions
Следующее
От: Marek Lewczuk
Дата:
Сообщение: Re: BUG #5075: Text Search parser does not identify xml tag when attribute name's contains underscore