--- The ODBC Global tracing was turned on too but any one entry was made from the powerbuilder app.
--- By running the script below, I receive a messagebox with the following content:
--- No problem on sending the entire PB app, but it's really big, so follows the initial script with the connect and the ini file content with the parameters. I will make a minimalist PB script to help with the problem isolation.
--- The ODBC driver used in all cases was the 32 bit .
--- The original computer where the program is working ok is a DELL laptop inspiron 7548 core i5 8GB
--- The computer presenting the reported problem is a Lenovo Yoga laptop 720-121KB core i5 8GB
--- The locale: The original and third computer are the same - The OS local is Portugues(Brasil), the language, date format, number format etc are the same: DD/MM/YYYY. Numbers use comma as decimal point and dot as group separator.
======================================================
erro -1 na abertura do BD
SQLSTATE = IM001
[Microsoft]ODBC Driver Manager] Driver does not support this function
======================================================
The PB script:
===========
string s, s1, aux, aux1
int qtc1, qtc2, retornoprofiles, atudbparms
string chlic, chcalc, testa_nr_carros
date dataref
int i
s = "ONIBUS.INI"
sqlca.DBMS = ProfileString (s, "sqlca", "dbms", "")
sqlca.dbparm = ProfileString (s, "sqlca", "dbparm", "")
CONNECT using sqlca;
if sqlca.sqlcode <> 0 then
messagebox ("erro " + string(sqlca.sqlcode) + " na abertura do BD", &
sqlca.sqlerrtext)
if messagebox("ÔNIBUS","Se voce tem um Banco de Dados salvo~n"+&
"pode usar a opção Arquivo/Retornar BD.~n~n"+&
"Voce deseja prosseguir?",Question!, Yesno!) = 2 then
return
end if
end if
The ONIBUS.INI parameters file
=========================
[sqlca]
dbms=ODBC
DbParm=ConnectString='Driver={Postgresql Unicode};Server=localhost;Port=5432;Database=onbpdc;Uid=dba;Pwd=sql';
==============================================
Em qui, 12 de jul de 2018 às 10:07, Adrian Klaver <adrian.klaver@xxxxxxxxxxx> escreveu:
On 07/12/2018 05:19 AM, Igor Korot wrote:
> ,Hi,
>
> On Wed, Jul 11, 2018 at 10:33 PM, Edgard Battisti Guimarães
> <edgardbg1@xxxxxxxxx> wrote:
>> I've ported a powerbuilder application to postgresql. Tested ok on windows
>> 10 64, was installed on two win10-64 other computers, all connecting the
>> postgresql database in the localhost with access via odbc. The third of them
>> presented the error detailed below in the logs (mylog and psqlodbc)
>> integrally copy and paste.
>
> Which database the application connecting to initially?
> Can you show the PB script that connects to the DB?
> Can you show the credentials you are trying to connect with?
> Can you turn on ODBC logging and send the log with the failure?
The above information is in the original post, with exception of PB script.
Given that the PB app is 32 bit and the computers are 64 bit I am
wondering if on the third computer the wrong ODBC driver is being used?
Also what are the hardware specifications for the third computer
relative to the other two?
Lastly the error message shows up in the source code of info.c in the
section for Unicode support:
#ifdef UNICODE_SUPPORT
if (CC_is_in_unicode_driver(conn))
{
len = utf8_to_ucs2(p, len, (SQLWCHAR *) rgbInfoValue,
cbInfoValueMax / WCLEN);
len *= WCLEN;
}
else
#endif /* UNICODE_SUPPORT */
strncpy_null((char *) rgbInfoValue, p, (size_t) cbInfoValueMax);
if (len >= cbInfoValueMax)
{
result = SQL_SUCCESS_WITH_INFO;
CC_set_error(conn, CONN_TRUNCATED, "The buffer was too
small for the InfoValue.", func);
}
}
So what is the locale for the third computer?
>
> Thank you.
>
>>
>> --
>> Edgard Battisti Guimarães
>>
>
>
--
Adrian Klaver
adrian.klaver@xxxxxxxxxxx
Edgard Battisti Guimarães