pg.ddx.io pgsql-odbc@postgresql.org mailing list archive
help / color / mirror / Atom feedProblem with SQL_LONGVARBINAY
2+ messages / 2 participants
[nested] [flat]
* Problem with SQL_LONGVARBINAY
@ 1970-01-01 00:00 Han <zhouhanok@vip.sina.com>
0 siblings, 0 replies; 2+ messages in thread
From: Han @ 1970-01-01 00:00 UTC (permalink / raw)
To: pgsql-odbc; +Cc: Hiroshi Inoue <Inoue@tpf.co.jp>
Hi,
There's a problem when insert a SQL_LONGVARBINARY(lo) column in the following way:
Use SQLBindParameter(...SQL_DATA_AT_EXEC)
and SQLParamData, SQLPutData.
The last time SQLParamData revoke a crash!
This is the sample code:
for (...)
{
sdw = SQL_DATA_AT_EXEC;
rc = SQLBindParameter(hstmt, w, SQL_PARAM_INPUT,
SQL_C_TCHAR, rgFields[ind].wSQLType,
rgFields[ind].precision, rgFields[ind].scale,
(LPTSTR)(((UDWORD)ind)+BIND_PARM_OFFSET), 0, &sdw);
}
rc = SQLExecDirect(hstmt, lpqt->sz, SQL_NTS);
if (SQL_NEED_DATA != rc)
return;
for(ind = 0; ind <= cTypes; ind++)
{
rc = SQLParamData(hstmt, &ptr);
if(rc != SQL_NEED_DATA)
break;
pch = qtMakeData(...);
if(*pch) {
rc = SQLPutData(hstmt, pch, SQL_NTS);
} else {
rc = SQLPutData(hstmt, (LPTSTR)IGNORED, SQL_NULL_DATA);
}
}
please check, thanks and regards!
Han
zhouhanok@vip.sina.com
2003-03-17
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Problem with SQL_LONGVARBINAY
@ 2003-03-21 05:18 Hiroshi Inoue <Inoue@tpf.co.jp>
0 siblings, 0 replies; 2+ messages in thread
From: Hiroshi Inoue @ 2003-03-21 05:18 UTC (permalink / raw)
To: Han <zhouhanok@vip.sina.com>; +Cc: pgsql-odbc
Sorry for the delay.
Please try the snapshot dll at
http://www.geocities.jp/inocchichichi/psqlodbc/.
regards,
Hiroshi Inoue
http://www.geocities.jp/inocchichichi/psqlodbc/
Han wrote:
>
> Hi,
> There's a problem when insert a SQL_LONGVARBINARY(lo) column in the following way:
> Use SQLBindParameter(...SQL_DATA_AT_EXEC)
> and SQLParamData, SQLPutData.
> The last time SQLParamData revoke a crash!
> This is the sample code:
> for (...)
> {
> sdw = SQL_DATA_AT_EXEC;
> rc = SQLBindParameter(hstmt, w, SQL_PARAM_INPUT,
> SQL_C_TCHAR, rgFields[ind].wSQLType,
> rgFields[ind].precision, rgFields[ind].scale,
> (LPTSTR)(((UDWORD)ind)+BIND_PARM_OFFSET), 0, &sdw);
> }
> rc = SQLExecDirect(hstmt, lpqt->sz, SQL_NTS);
> if (SQL_NEED_DATA != rc)
> return;
> for(ind = 0; ind <= cTypes; ind++)
> {
> rc = SQLParamData(hstmt, &ptr);
> if(rc != SQL_NEED_DATA)
> break;
>
> pch = qtMakeData(...);
>
> if(*pch) {
> rc = SQLPutData(hstmt, pch, SQL_NTS);
> } else {
> rc = SQLPutData(hstmt, (LPTSTR)IGNORED, SQL_NULL_DATA);
> }
> }
>
> please check, thanks and regards!
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2003-03-21 05:18 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1970-01-01 00:00 Problem with SQL_LONGVARBINAY Han <zhouhanok@vip.sina.com>
2003-03-21 05:18 Re: Problem with SQL_LONGVARBINAY Hiroshi Inoue <Inoue@tpf.co.jp>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox