Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hsn8p-0004iL-7B for pgsql-odbc@arkaria.postgresql.org; Wed, 31 Jul 2019 11:51:35 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hsn8n-0001w3-Ev for pgsql-odbc@arkaria.postgresql.org; Wed, 31 Jul 2019 11:51:33 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hsn8n-0001vw-6p for pgsql-odbc@lists.postgresql.org; Wed, 31 Jul 2019 11:51:33 +0000 Received: from mail01.asahi-net.or.jp ([202.224.55.13]) by magus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hsn8i-0000ie-D9 for pgsql-odbc@postgresql.org; Wed, 31 Jul 2019 11:51:32 +0000 Received: from [192.168.0.6] (KD124208079206.ppp-bb.dion.ne.jp [124.208.79.206]) (Authenticated sender: GQ9H-INUE) by mail01.asahi-net.or.jp (Postfix) with ESMTPA id 1F0CA12C3DB; Wed, 31 Jul 2019 20:51:22 +0900 (JST) Subject: Re: psqlodbc - prepared statement crash To: Xuesong Gao References: Cc: "pgsql-odbc@postgresql.org" From: "Inoue, Hiroshi" Message-ID: Date: Wed, 31 Jul 2019 20:51:21 +0900 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/alternative; boundary="------------68AF7C0EF0273535A66583A9" Content-Language: en-US X-Antivirus: AVG (VPS 190731-0, 2019/07/31), Outbound message X-Antivirus-Status: Clean List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. --------------68AF7C0EF0273535A66583A9 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Hi, Sorry for the late reply. You seem to turn on Mylog optipn of Global settings only. Could you please turn on Mylog option of Advanced Options (DataSource) as well? I have a question. What does "city = ..."  of StatementText = "select city, ? as i from public.city where city = ...", mean? regards, Hiroshi Inoue On 2019/07/26 22:56, Xuesong Gao wrote: > > I am using MS ODBCTest tool for testing purpose here, and it crashed > after I did following steps: > > 1.Full connect to DSN. > > 2.SQLPrepare: select city, ? as i from public.city where city = ? > > 3.SQLBindParameter: number 1, value type SQL_C_CHAR, parameter type > SQL_CHAR, value 1; > > 4.SQLBindParameter: number 2, value type SQL_C_CHAR, parameter type > SQL_CHAR, value Abha; > > 5.SQLExecute > > * your ODBC driver version > > Unicode x64, 9.06.05.00 > > * your PostgreSQL database version > > PostgreSQL 10, sample database dvdrental > > * any error messages you saw on the screen > > messages in ODBCTest tool console: > > Full Connect(Default) > > Env. Attr. SQL_ATTR_ODBC_VERSION set to SQL_OV_ODBC3 > > Successfully connected to DSN 'dvdrental'. > > SQLPrepare: > > In: StatementHandle = 0x00000000047221C0, StatementText = "select > city, ? as i from public.city where city = ...", TextLength = 51 > > Return:           SQL_SUCCESS=0 > > SQLBindParameter: > > In: StatementHandle = 0x00000000047221C0, ParameterNumber = 1, > InputOutputtype = SQL_PARAM_INPUT=1, ValueType = SQL_C_CHAR=1, > > ParameterType = SQL_CHAR=1, ColumnSize = 0, DecimalDigits = 0, > ParameterValuePtr = "1", BufferLength = 0, StrLen_or_IndPtr = > SQL_NTS=-3, SQL_LEN_DATA_AT_EXEC = FALSE, > > Buffer Size = 600 > > Return:           SQL_SUCCESS=0 > > SQLBindParameter: > > In: StatementHandle = 0x00000000047221C0, ParameterNumber = 2, > InputOutputtype = SQL_PARAM_INPUT=1, ValueType = SQL_C_CHAR=1, > > ParameterType = SQL_CHAR=1, ColumnSize = 0, DecimalDigits = 0, > ParameterValuePtr = "Abha", BufferLength = 0, StrLen_or_IndPtr = > SQL_NTS=-3, SQL_LEN_DATA_AT_EXEC = FALSE, > > Buffer Size = 600 > > Return:           SQL_SUCCESS=0 > > * the debug log (mylog_????.log) file (you will have to enable the > mylog driver option) > > attached > > > > *Song  X. Gao* > Solutions Architect > > Email xgao@senturus.com > Mobile 732 406 6347 > *senturus.com* > --- このメールは、AVG によってウイルス チェックされています。 http://www.avg.com --------------68AF7C0EF0273535A66583A9 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: 8bit Hi,

Sorry for the late reply.

You seem to turn on Mylog optipn of Global settings only.
Could you please turn on Mylog option of Advanced Options (DataSource) as well?

I have a question.
What does "city = ..."  of
    StatementText = "select city, ? as i from public.city where city = ...",
mean?

regards,
Hiroshi Inoue

On 2019/07/26 22:56, Xuesong Gao wrote:

I am using MS ODBCTest tool for testing purpose here, and it crashed after I did following steps:

 

1.       Full connect to DSN.

2.       SQLPrepare: select city, ? as i from public.city where city = ?

3.       SQLBindParameter: number 1, value type SQL_C_CHAR, parameter type SQL_CHAR, value 1;

4.       SQLBindParameter: number 2, value type SQL_C_CHAR, parameter type SQL_CHAR, value Abha;

5.       SQLExecute

 

  • your ODBC driver version

Unicode x64, 9.06.05.00

  • your PostgreSQL database version

PostgreSQL 10, sample database dvdrental

  • any error messages you saw on the screen

messages in ODBCTest tool console:

            Full Connect(Default)

 

            Env. Attr. SQL_ATTR_ODBC_VERSION set to SQL_OV_ODBC3

 

            Successfully connected to DSN 'dvdrental'.

SQLPrepare:

                                                In:                                            StatementHandle = 0x00000000047221C0, StatementText = "select city, ? as i from public.city where city = ...", TextLength = 51

                                                Return:           SQL_SUCCESS=0

SQLBindParameter:

                                                In:                                            StatementHandle = 0x00000000047221C0, ParameterNumber = 1, InputOutputtype = SQL_PARAM_INPUT=1, ValueType = SQL_C_CHAR=1,

                                                                                                                        ParameterType = SQL_CHAR=1, ColumnSize = 0, DecimalDigits = 0, ParameterValuePtr = "1", BufferLength = 0, StrLen_or_IndPtr = SQL_NTS=-3, SQL_LEN_DATA_AT_EXEC = FALSE,

                                                                                                                        Buffer Size = 600

                                                Return:           SQL_SUCCESS=0

SQLBindParameter:

                                                In:                                            StatementHandle = 0x00000000047221C0, ParameterNumber = 2, InputOutputtype = SQL_PARAM_INPUT=1, ValueType = SQL_C_CHAR=1,

                                                                                                                        ParameterType = SQL_CHAR=1, ColumnSize = 0, DecimalDigits = 0, ParameterValuePtr = "Abha", BufferLength = 0, StrLen_or_IndPtr = SQL_NTS=-3, SQL_LEN_DATA_AT_EXEC = FALSE,

                                                                                                                        Buffer Size = 600

                                                Return:           SQL_SUCCESS=0

  • the debug log (mylog_????.log) file (you will have to enable the mylog driver option)

attached

 

 

Song  X. Gao
Solutions Architect

Email xgao@senturus.com
Mobile 732 406 6347
senturus.com

 



ウイルス フリー。 www.avg.com
--------------68AF7C0EF0273535A66583A9--