- Jesse Busker
- PowerServer
- Tuesday, 31 December 2024 09:35 PM UTC
I am trying to migrate from using Postgres ODBC drivers to the ADO .Net version. In the native and powerclient side the connection is great and in my tests is comparable or better than the ODBC. My question is, when creating the powerserver database cache connection it looks like it is using the ODBC functionality. I have a postgres function that essentially is a logger that takes a couple IN parameters and inserts a row to the log table and returns the identity ID for that row.
When using ODBC this is accomplished by doing an inline select log_add(:as_cat, :as_sub_cat, :as_note) into :ll_id from log_table using sqlca;
When using ADO this gives an error as described here https://docs.appeon.com/pb2025/connecting_to_your_database/ch02s03s05.html
Transaction
The following transaction error might occur:
"current transaction is aborted, commands ignored until end of transaction block"
Cause: The error is triggered by exceptions in the preceding code, such as:
1) ESQL parameter type mismatch
2) Parameter length exceeding the limit (e.g., 22001: value too long for type character(lO))
3) DataWindow Retrieve parameter type mismatch.
Using ADO I create a datastore and do a lds_log.retrieve(:as_cat, :as_sub_cat, :as_note) and if rowcount() > 0 then getitemnumber(1, "id")
The reason I say "it looks like it is using ODBC" is because the inline select is working fine in the PowerServer application. The counter opinion is based on an assumption that is referenced at the bottom of that page saying that a known issue is that the ADO may not reconnect and gives an error "Select Error: Internal Npgsql bug: ..." The PowerServer database driver for Postgres is using the Npgsql version.
So, can someone confirm if PowerServer database cache is using ODBC or ADO.Net when applications connect to it? If using ODBC, is there a way to create an ADO cache?
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.