1. Gerardo Campos
  2. PowerServer Mobile (Obsolete)
  3. Friday, 6 September 2019 23:06 PM UTC

Has anybody been able to connect to Postgres from a mobile app?

The app works fine on Desktop and the PostgreSQL35W profile connects OK from both the ODBC admin and PowerServer`s Toolkit, but when the app is deployed to mobile, it doesn`t recognize the DSN name:

"key=value argument incorrect in ConnectString Parameter name: dsn".

I tried using both the name of the data source that was used when creating the SQLCA, and the name used by ODBC administrator (PosgreSQL35W). In both cases the result is the same. Any ideas?

Here is the connectstring I am using:

SQLCA.DBParm = "ConnectString='DSN=PostgreSQL35W;UID=postgres;PWD=sql' "

Thanks in advance for your thoughts :)

Attachments (1)
Kai Zhao @Appeon Accepted Answer Pending Moderation
  1. Monday, 9 September 2019 00:35 AM UTC
  2. PowerServer Mobile (Obsolete)
  3. # 1
Hi Gerardo,

PowerServer doesn't support using ODBC Driver to connect the PostgreSQL, please
use the PostgreSQL native driver to resolve this kind of issue.
https://www.appeon.com/support/documents/appeon_online_help/2017/server_configuration_guide_for_net/supported_database_drivers.html

Our .Net server is using the Npgsql which is the .NET data provider for
PostgreSQL. you are not need to install extra driver.

Please go to AEM > Server > Resources > Data Source > %your data source% to
change the data source type from 'ODBC Driver' to 'PostgreSQL native driver'.

Regards,
ZhaoKai
Comment
  1. Gerardo Campos
  2. Monday, 9 September 2019 12:58 PM UTC
Thank you so much ZhaoKai!!

I did the change as you suggested and it worked right away.



Thumbs up :)
  1. Helpful
  1. Chris Pollach @Appeon
  2. Monday, 9 September 2019 14:26 PM UTC
Hi Gerardo;

FYI: This is a tricky one as he PS Toolkit embedded in the PB IDE is like PB - a 32 bit App. As such, it uses PB's PostGreSQL ODBC connection so that during the "build" & generation part of the PS Web Application deployment, the PS Toolkit it can verify your SQL. However, PS itself is a 64bit server app and as such uses its own native driver to connect to the PostGreSQL DBMS. You have to remember to treat each piece differently when connecting to a DBMS. I hope that explains (clarifies) the confusion a bit more for you and others reading this thread.

Regards ... Chris
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.