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

Поиск
Список
Период
Сортировка
От Inoue, Hiroshi
Тема Re: Rockwell FactoryTalk Says 'SQL_TIMESTAMP data type is not supported'
Дата
Msg-id ff0ed851-4cf4-e89e-2e69-b6d9ed163206@dream.email.ne.jp
обсуждение исходный текст
Ответ на Re: Rockwell FactoryTalk Says 'SQL_TIMESTAMP data type is not supported'  ("Inoue, Hiroshi" <h-inoue@dream.email.ne.jp>)
Список pgsql-odbc
Hi Michael,

On 2019/07/28 16:45, michael.riksman@khalda-eg.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.riksman@khalda-eg.com

 

From: Inoue, Hiroshi [mailto:h-inoue@dream.email.ne.jp]
Sent: Friday, 26 July 2019 2:29 PM
To: Michael Riksman (Salam - Gas)
Cc: pgsql-odbc@postgresql.org
Subject: Re: Rockwell FactoryTalk Says 'SQL_TIMESTAMP data type is not supported'

 

Hi,

On 2019/07/25 15:27, michael.riksman@khalda-eg.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 ?

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.riksman@khalda-eg.com


ウイルス フリー。 www.avg.com
Вложения

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

Предыдущее
От:
Дата:
Сообщение: RE: Rockwell FactoryTalk Says 'SQL_TIMESTAMP data type is not supported'
Следующее
От: varinder singh
Дата:
Сообщение: Postgresql Document Required