Re: Rockwell FactoryTalk Says 'SQL_TIMESTAMP data type is not supported'

From: "Inoue, Hiroshi" <h-inoue(at)dream(dot)email(dot)ne(dot)jp>
To: michael(dot)riksman(at)khalda-eg(dot)com
Cc: pgsql-odbc(at)postgresql(dot)org
Subject: Re: Rockwell FactoryTalk Says 'SQL_TIMESTAMP data type is not supported'
Date: 2019-07-29 04:33:09
Message-ID: ff0ed851-4cf4-e89e-2e69-b6d9ed163206@dream.email.ne.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

Hi Michael,

On 2019/07/28 16:45, michael(dot)riksman(at)khalda-eg(dot)com wrote:
>
> Hey,
>
> I’m not sure what happened, but after restarting the PC, it started
> working. I am sure I restarted after installing the driver, but
> perhaps I didn’t…?
>
> But we have data!
>
> THANK YOU SO MUCH!
>
> I am curious – what was the original error with TIMESTAMP? What lines
> of code did you change?
>

I would commit the following change.

diff --git a/info.c b/info.c
index 452dabf..c2dc0aa 100644
--- a/info.c
+++ b/info.c
@@ -1155,8 +1155,8 @@ PGAPI_GetTypeInfo(HSTMT hstmt,
        {
                EnvironmentClass        *env = CC_get_env(conn);

-               /* Filter unsupported data types */
-               if (EN_is_odbc2(env))
+               /* Filter unsupported data types when fSqlType =
SQL_ALL_TYPES */
+               if (SQL_ALL_TYPES == fSqlType && EN_is_odbc2(env))
                {
                        switch (sqlType)
                        {

Since commit 778571, SQLGetTypeInfo() filters SQL_TYPE_DATE,
SQL_TYPE_TIME and SQL_TYPE_TIMESTAMP for ODBC 2.x applications. However
it doesn't seem appropriate to filter them for individual
SQLGetTypeInfo(.., SQL_DATE/TIME/TIMESTAMP) because  Microsoft ODBC
driver manager calls SQLGetTypeInfo(.., SQL_TYPE_DATE/TIME/TIMESTAMP) of
ODBC 3.x drivers when ODBC 2.x applications call SQLGetTypeInfo(..,
SQL_DATE/TIME/TIMESTAMP).

  ** The behavior of unixODBC  is different.

regards,
Hiroshi Inoue

> Thanks.
>
> Regards,
>
> Michael Riksman
>
> Instrument and Control Specialist
>
> Khalda Petroleum Co.
>
> A KPC/Apache Corp. Joint Venture
>
> Salam Base, Egypt
>
> Mob: +20 122 0530603
>
> Email: michael(dot)riksman(at)khalda-eg(dot)com
>
> *From:*Inoue, Hiroshi [mailto:h-inoue(at)dream(dot)email(dot)ne(dot)jp]
> *Sent:* Friday, 26 July 2019 2:29 PM
> *To:* Michael Riksman (Salam - Gas)
> *Cc:* pgsql-odbc(at)postgresql(dot)org
> *Subject:* Re: Rockwell FactoryTalk Says 'SQL_TIMESTAMP data type is
> not supported'
>
> Hi,
>
> On 2019/07/25 15:27, michael(dot)riksman(at)khalda-eg(dot)com
> <mailto:michael(dot)riksman(at)khalda-eg(dot)com> wrote:
>
> Hey,
>
> I turned it on;
>
> But the only time something is written to the trace is when I open
> up the configuration window, and click OK;
>
>
>
> postgreSQL
>
> 51 ‘Tags in Model’
>
> SQLpostgres.LOG
>
>
>
> Microsoft SQL
>
> 17 ‘Tags in Model’
>
> SQLmsql.LOG
>
> But when I right-click and start the DataLog;
>
> Nothing is added to the SQL.LOG file/ODBC Tracing.
>
> Data is successfully being logged to Microsoft SQL at this point –
> but still no additional data in the ODBC Tracing.
>
>
> So there seems no ODBC API call.
> Would you like to see the page
> www.plctalk.net/qanda/archive/index.php/t-109368.html
> <http://www.plctalk.net/qanda/archive/index.php/t-109368.html> ?
>
> regards,
> Hiroshi Inoue
>
>
> Regards,
>
> Michael Riksman
>
> Instrument and Control Specialist
>
> Khalda Petroleum Co.
>
> A KPC/Apache Corp. Joint Venture
>
> Salam Base, Egypt
>
> Mob: +20 122 0530603
>
> Email: michael(dot)riksman(at)khalda-eg(dot)com
> <mailto:michael(dot)riksman(at)khalda-eg(dot)com>
>

---
このメールは、AVG によってウイルス チェックされています。
http://www.avg.com

In response to

Browse pgsql-odbc by date

  From Date Subject
Next Message varinder singh 2019-07-31 11:43:07 Postgresql Document Required
Previous Message michael.riksman 2019-07-28 07:45:10 RE: Rockwell FactoryTalk Says 'SQL_TIMESTAMP data type is not supported'