Alaska Software Inc. - PostgreSQL ODBC connection string
Username: Password:
AuthorTopic: PostgreSQL ODBC connection string
Tim CallahanPostgreSQL ODBC connection string
on Tue, 24 Jan 2023 08:07:39 -0800
I am having trouble connection to a PostgreSQL database via ODBCDBE. I
have tried numerous variations of connection strings and keep getting
a 5381 error. In searching there is not any real information on this
error. In my connection strings I have tried a DSN and also specifying
the driver and db directly in the connection string. I am using v13 of
the official PostgreSQL ODBC driver. Does any have a working
connection string they can share?
TIA,
Tim
Jim LeeRe: PostgreSQL ODBC connection string
on Wed, 25 Jan 2023 06:07:48 +0100
hi,

> I am using v13 of > the official PostgreSQL ODBC driver.

i guess you have a x64 OS and download ODBC Driver for x86 and NOT x64
but which Odbcad32.exe are you using ?

there is a Version in
C:\Windows\System32\odbcad32.exe
and
C:\Windows\SysWOW64\odbcad32.exe

remember Xbase++ is 32 Bit
Matej JuracRe: PostgreSQL ODBC connection string
on Wed, 25 Jan 2023 10:20:16 +0100
@OP here you go:

"DSN=%DSN%;DATABASE=%DBNAME%;SERVER=%HOST%;PORT=5432;UID=%USER%;PWD=%PASSWORD%;CA=d;A6=;A7=100;B0=2048;B1=8190;BI=0;C2=dd_;CX=1c205008b;A1=7.4;sslmode=require"

replace %___% with appropriate data
if sslmode is not requited by server, remove entry

Mind you need to open access for that user from client IP to server on database server

on local machine be sure to admin data source %DSN% with c:\windows\syswow64\odbcad32.exe as Mr. Lee wrote. Use machine dsn for machine wide dsn and user dsn only for logged user.




Jim Lee wrote in message news:244cfc8d$64c7062c$1ada@news.alaska-software.com...
>hi,
>
>> I am using v13 of > the official PostgreSQL ODBC driver.
>
>i guess you have a x64 OS and download ODBC Driver for x86 and NOT x64
>but which Odbcad32.exe are you using ?
>
>there is a Version in
>C:\Windows\System32\odbcad32.exe
>and
>C:\Windows\SysWOW64\odbcad32.exe
>
>remember Xbase++ is 32 Bit
Tim CallahanRe: PostgreSQL ODBC connection string
on Thu, 26 Jan 2023 12:41:59 -0800
On Wed, 25 Jan 2023 10:20:16 +0100, Matej Jurac wrote:

Thank you both. I installed the 32-bit Postgres ODBC driver and set up
a system DSN. Then used the connection string below and was able to
connect. Yay. However, now I am getting the message that OrdListAdd()
is not supported by the ODBCDBE   Any thoughts? I am going to
contact tech support about this too.

>@OP here you go:
>
>"DSN=%DSN%;DATABASE=%DBNAME%;SERVER=%HOST%;PORT=5432;UID=%USER%;PWD=%PASSWORD%;CA=d;A6=;A7=100;B0=2048;B1=8190;BI=0;C2=dd_;CX=1c205008b;A1=7.4;sslmode=require"
>
>replace %___% with appropriate data
>if sslmode is not requited by server, remove entry
>
>Mind you need to open access for that user from client IP to server on database server
>
>on local machine be sure to admin data source %DSN% with c:\windows\syswow64\odbcad32.exe as Mr. Lee wrote. Use machine dsn for machine wide dsn and user dsn only for logged user.
>
>
>
>
>Jim Lee wrote in message news:244cfc8d$64c7062c$1ada@news.alaska-software.com...
>>hi,
>>
>>> I am using v13 of > the official PostgreSQL ODBC driver.
>>
>>i guess you have a x64 OS and download ODBC Driver for x86 and NOT x64
>>but which Odbcad32.exe are you using ?
>>
>>there is a Version in
>>C:\Windows\System32\odbcad32.exe
>>and
>>C:\Windows\SysWOW64\odbcad32.exe
>>
>>remember Xbase++ is 32 Bit
Matej JuracRe: PostgreSQL ODBC connection string
on Fri, 27 Jan 2023 08:47:17 +0100
"OrdListAdd" - no such thing exist on pure ODBC->SQL , that is straight clipper/xbase thing ; it might be present on pgdbe driver though

You need sorted resoult: ORDER BY clause in select statement
You need more performance on server side for where: CREATE INDEX on server side so its engine can use it
You need data linked across tables: SELECT ..... JOIN ....
You need filter final resoults: HAVING

And so on.



Tim Callahan wrote in message news:4ap5thhni86lit1le47pil7ilij8pi00vr@4ax.com...
>On Wed, 25 Jan 2023 10:20:16 +0100, Matej Jurac wrote:
>
>Thank you both. I installed the 32-bit Postgres ODBC driver and set up
>a system DSN. Then used the connection string below and was able to
>connect. Yay. However, now I am getting the message that OrdListAdd()
>is not supported by the ODBCDBE   Any thoughts? I am going to
>contact tech support about this too.
>
>>@OP here you go:
>>
>>"DSN=%DSN%;DATABASE=%DBNAME%;SERVER=%HOST%;PORT=5432;UID=%USER%;PWD=%PASSWORD%;CA=d;A6=;A7=100;B0=2048;B1=8190;BI=0;C2=dd_;CX=1c205008b;A1=7.4;sslmode=require"
>>
>>replace %___% with appropriate data
>>if sslmode is not requited by server, remove entry
>>
>>Mind you need to open access for that user from client IP to server on database server
>>
>>on local machine be sure to admin data source %DSN% with c:\windows\syswow64\odbcad32.exe as Mr. Lee wrote. Use machine dsn for machine wide dsn and user dsn only for logged user.
>>
>>
>>
>>
>>Jim Lee wrote in message news:244cfc8d$64c7062c$1ada@news.alaska-software.com...
>>>hi,
>>>
>>>> I am using v13 of > the official PostgreSQL ODBC driver.
>>>
>>>i guess you have a x64 OS and download ODBC Driver for x86 and NOT x64
>>>but which Odbcad32.exe are you using ?
>>>
>>>there is a Version in
>>>C:\Windows\System32\odbcad32.exe
>>>and
>>>C:\Windows\SysWOW64\odbcad32.exe
>>>
>>>remember Xbase++ is 32 Bit
Tim CallahanRe: PostgreSQL ODBC connection string
on Fri, 27 Jan 2023 13:12:19 -0800
Ah, ok, thanks. Yes it does exist in PGDBE. I have poor performance
with that driver so was checkingn ODBCDBE driver to see if it is any
better. I had assumed this driver, since it was from xBase, would
support all xBase functions but I guess not.
Thanks again.

On Fri, 27 Jan 2023 08:47:17 +0100, Matej Jurac wrote:

>"OrdListAdd" - no such thing exist on pure ODBC->SQL , that is straight clipper/xbase thing ; it might be present on pgdbe driver though
>
>You need sorted resoult: ORDER BY clause in select statement
>You need more performance on server side for where: CREATE INDEX on server side so its engine can use it
>You need data linked across tables: SELECT ..... JOIN ....
>You need filter final resoults: HAVING
>
>And so on.
>
>
>
>Tim Callahan wrote in message news:4ap5thhni86lit1le47pil7ilij8pi00vr@4ax.com...
>>On Wed, 25 Jan 2023 10:20:16 +0100, Matej Jurac wrote:
>>
>>Thank you both. I installed the 32-bit Postgres ODBC driver and set up
>>a system DSN. Then used the connection string below and was able to
>>connect. Yay. However, now I am getting the message that OrdListAdd()
>>is not supported by the ODBCDBE   Any thoughts? I am going to
>>contact tech support about this too.
>>
>>>@OP here you go:
>>>
>>>"DSN=%DSN%;DATABASE=%DBNAME%;SERVER=%HOST%;PORT=5432;UID=%USER%;PWD=%PASSWORD%;CA=d;A6=;A7=100;B0=2048;B1=8190;BI=0;C2=dd_;CX=1c205008b;A1=7.4;sslmode=require"
>>>
>>>replace %___% with appropriate data
>>>if sslmode is not requited by server, remove entry
>>>
>>>Mind you need to open access for that user from client IP to server on database server
>>>
>>>on local machine be sure to admin data source %DSN% with c:\windows\syswow64\odbcad32.exe as Mr. Lee wrote. Use machine dsn for machine wide dsn and user dsn only for logged user.
>>>
>>>
>>>
>>>
>>>Jim Lee wrote in message news:244cfc8d$64c7062c$1ada@news.alaska-software.com...
>>>>hi,
>>>>
>>>>> I am using v13 of > the official PostgreSQL ODBC driver.
>>>>
>>>>i guess you have a x64 OS and download ODBC Driver for x86 and NOT x64
>>>>but which Odbcad32.exe are you using ?
>>>>
>>>>there is a Version in
>>>>C:\Windows\System32\odbcad32.exe
>>>>and
>>>>C:\Windows\SysWOW64\odbcad32.exe
>>>>
>>>>remember Xbase++ is 32 Bit
Matej JuracRe: PostgreSQL ODBC connection string
on Tue, 31 Jan 2023 08:25:58 +0100
There is "help20\pg20.chm" help file in xbase install that contains information on pgdbe , but it looks it is not maintained much, there is few bytes difference between january 2020 and september 2022. Perhaps there is chapter somewhere that details which functionality is and which is not supported.  even doc.alaska-software.com is not helpful

check also Roger Donnay website forum, there are numerous threads on PGDBE.



Tim Callahan wrote in message news:aff8th5dc0jtr2ov3q3bem3ijp51i07laj@4ax.com...
>Ah, ok, thanks. Yes it does exist in PGDBE. I have poor performance
>with that driver so was checkingn ODBCDBE driver to see if it is any
>better. I had assumed this driver, since it was from xBase, would
>support all xBase functions but I guess not.
>Thanks again.
>
>On Fri, 27 Jan 2023 08:47:17 +0100, Matej Jurac wrote:
>
>>"OrdListAdd" - no such thing exist on pure ODBC->SQL , that is straight clipper/xbase thing ; it might be present on pgdbe driver though
>>
>>You need sorted resoult: ORDER BY clause in select statement
>>You need more performance on server side for where: CREATE INDEX on server side so its engine can use it
>>You need data linked across tables: SELECT ..... JOIN ....
>>You need filter final resoults: HAVING
>>
>>And so on.
>>
>>
>>
>>Tim Callahan wrote in message news:4ap5thhni86lit1le47pil7ilij8pi00vr@4ax.com...
>>>On Wed, 25 Jan 2023 10:20:16 +0100, Matej Jurac wrote:
>>>
>>>Thank you both. I installed the 32-bit Postgres ODBC driver and set up
>>>a system DSN. Then used the connection string below and was able to
>>>connect. Yay. However, now I am getting the message that OrdListAdd()
>>>is not supported by the ODBCDBE   Any thoughts? I am going to
>>>contact tech support about this too.
>>>
>>>>@OP here you go:
>>>>
>>>>"DSN=%DSN%;DATABASE=%DBNAME%;SERVER=%HOST%;PORT=5432;UID=%USER%;PWD=%PASSWORD%;CA=d;A6=;A7=100;B0=2048;B1=8190;BI=0;C2=dd_;CX=1c205008b;A1=7.4;sslmode=require"
>>>>
>>>>replace %___% with appropriate data
>>>>if sslmode is not requited by server, remove entry
>>>>
>>>>Mind you need to open access for that user from client IP to server on database server
>>>>
>>>>on local machine be sure to admin data source %DSN% with c:\windows\syswow64\odbcad32.exe as Mr. Lee wrote. Use machine dsn for machine wide dsn and user dsn only for logged user.
>>>>
>>>>
>>>>
>>>>
>>>>Jim Lee wrote in message news:244cfc8d$64c7062c$1ada@news.alaska-software.com...
>>>>>hi,
>>>>>
>>>>>> I am using v13 of > the official PostgreSQL ODBC driver.
>>>>>
>>>>>i guess you have a x64 OS and download ODBC Driver for x86 and NOT x64
>>>>>but which Odbcad32.exe are you using ?
>>>>>
>>>>>there is a Version in
>>>>>C:\Windows\System32\odbcad32.exe
>>>>>and
>>>>>C:\Windows\SysWOW64\odbcad32.exe
>>>>>
>>>>>remember Xbase++ is 32 Bit
Tim CallahanRe: PostgreSQL ODBC connection string
on Wed, 08 Feb 2023 12:53:12 -0800
On Tue, 31 Jan 2023 08:25:58 +0100, Matej Jurac wrote:

Thanks for the tips.

>There is "help20\pg20.chm" help file in xbase install that contains information on pgdbe , but it looks it is not maintained much, there is few bytes difference between january 2020 and september 2022. Perhaps there is chapter somewhere that details which functionality is and which is not supported.  even doc.alaska-software.com is not helpful
>
>check also Roger Donnay website forum, there are numerous threads on PGDBE.
>
>
>
>Tim Callahan wrote in message news:aff8th5dc0jtr2ov3q3bem3ijp51i07laj@4ax.com...
>>Ah, ok, thanks. Yes it does exist in PGDBE. I have poor performance
>>with that driver so was checkingn ODBCDBE driver to see if it is any
>>better. I had assumed this driver, since it was from xBase, would
>>support all xBase functions but I guess not.
>>Thanks again.
>>
>>On Fri, 27 Jan 2023 08:47:17 +0100, Matej Jurac wrote:
>>
>>>"OrdListAdd" - no such thing exist on pure ODBC->SQL , that is straight clipper/xbase thing ; it might be present on pgdbe driver though
>>>
>>>You need sorted resoult: ORDER BY clause in select statement
>>>You need more performance on server side for where: CREATE INDEX on server side so its engine can use it
>>>You need data linked across tables: SELECT ..... JOIN ....
>>>You need filter final resoults: HAVING
>>>
>>>And so on.
>>>
>>>
>>>
>>>Tim Callahan wrote in message news:4ap5thhni86lit1le47pil7ilij8pi00vr@4ax.com...
>>>>On Wed, 25 Jan 2023 10:20:16 +0100, Matej Jurac wrote:
>>>>
>>>>Thank you both. I installed the 32-bit Postgres ODBC driver and set up
>>>>a system DSN. Then used the connection string below and was able to
>>>>connect. Yay. However, now I am getting the message that OrdListAdd()
>>>>is not supported by the ODBCDBE   Any thoughts? I am going to
>>>>contact tech support about this too.
>>>>
>>>>>@OP here you go:
>>>>>
>>>>>"DSN=%DSN%;DATABASE=%DBNAME%;SERVER=%HOST%;PORT=5432;UID=%USER%;PWD=%PASSWORD%;CA=d;A6=;A7=100;B0=2048;B1=8190;BI=0;C2=dd_;CX=1c205008b;A1=7.4;sslmode=require"
>>>>>
>>>>>replace %___% with appropriate data
>>>>>if sslmode is not requited by server, remove entry
>>>>>
>>>>>Mind you need to open access for that user from client IP to server on database server
>>>>>
>>>>>on local machine be sure to admin data source %DSN% with c:\windows\syswow64\odbcad32.exe as Mr. Lee wrote. Use machine dsn for machine wide dsn and user dsn only for logged user.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>Jim Lee wrote in message news:244cfc8d$64c7062c$1ada@news.alaska-software.com...
>>>>>>hi,
>>>>>>
>>>>>>> I am using v13 of > the official PostgreSQL ODBC driver.
>>>>>>
>>>>>>i guess you have a x64 OS and download ODBC Driver for x86 and NOT x64
>>>>>>but which Odbcad32.exe are you using ?
>>>>>>
>>>>>>there is a Version in
>>>>>>C:\Windows\System32\odbcad32.exe
>>>>>>and
>>>>>>C:\Windows\SysWOW64\odbcad32.exe
>>>>>>
>>>>>>remember Xbase++ is 32 Bit