pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Hiroshi Inoue <Inoue@tpf.co.jp>
To: Han <zhouhanok@vip.sina.com>
Cc: pgsql-odbc@postgresql.org <pgsql-odbc@postgresql.org>
Subject: Re: Problem with SQL_LONGVARBINAY
Date: Fri, 21 Mar 2003 14:18:31 +0900
Message-ID: <3E7AA0A7.C6DB2B90@tpf.co.jp> (raw)
References: <md5:66737CAFEF2FEC3AA95EDAA0C8334841>

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!



view thread (2+ messages)

Message-ID: <3E7AA0A7.C6DB2B90@tpf.co.jp>
Permalink:  ../3E7AA0A7.C6DB2B90@tpf.co.jp/
Also on:    postgresql.org/message-id/3E7AA0A7.C6DB2B90@tpf.co.jp

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-odbc@postgresql.org
  Cc: Inoue@tpf.co.jp, zhouhanok@vip.sina.com
  Subject: Re: Problem with SQL_LONGVARBINAY
  In-Reply-To: <3E7AA0A7.C6DB2B90@tpf.co.jp>
  References: <md5:66737CAFEF2FEC3AA95EDAA0C8334841> <3E7AA0A7.C6DB2B90@tpf.co.jp>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

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