postgresql issues
-
- Posts: 451
- Joined: Wed 19 Jan 2005 09:59
postgresql issues
Hello,
I have a Datamodule with one UniConnection component. This connection is shared between a worker thread object (listening a TCP server within a thread every 500ms) and the main program (user's action). This is well working when using an SQLite provider. I'm getting a lot of exceptions when working with the PostgreSQL provider.
'first chance' Exception at $757F812F. Exception Class Exception with a message 'Invalid parameters specified'
'first chance' Exception at $757F812F. Exception class EPgError with a message 'Unexpected server response:' '
'first chance' Exception at $757F812F. Exception Class Exception with a message 'Invalid parameters specified'
'first chance' Exception at $757F812F. Exception class EPgError with a message 'Unexpected server response:' '
'first chance' Exception at $757F812F. Exception class EUniError with a message 'Unexpected server response:' '
Loading module: DUser.dll. No debug information. Base address: $74360000
Exception 'first chance' at $757F812F. Exception class EAssertionFailed with a message 'Assertion failure (D:\Projects\Delphi\Dac\PostgreSql\Source\PgSQLProtocol.pas 2321 line)
My software must run with a SQLite database or a postgreSQL database.
I have a Datamodule with one UniConnection component. This connection is shared between a worker thread object (listening a TCP server within a thread every 500ms) and the main program (user's action). This is well working when using an SQLite provider. I'm getting a lot of exceptions when working with the PostgreSQL provider.
'first chance' Exception at $757F812F. Exception Class Exception with a message 'Invalid parameters specified'
'first chance' Exception at $757F812F. Exception class EPgError with a message 'Unexpected server response:' '
'first chance' Exception at $757F812F. Exception Class Exception with a message 'Invalid parameters specified'
'first chance' Exception at $757F812F. Exception class EPgError with a message 'Unexpected server response:' '
'first chance' Exception at $757F812F. Exception class EUniError with a message 'Unexpected server response:' '
Loading module: DUser.dll. No debug information. Base address: $74360000
Exception 'first chance' at $757F812F. Exception class EAssertionFailed with a message 'Assertion failure (D:\Projects\Delphi\Dac\PostgreSql\Source\PgSQLProtocol.pas 2321 line)
My software must run with a SQLite database or a postgreSQL database.
Re: postgresql issues
Hello,
As I remember topics from this forum, if you use thread application each thread needs to have its own UniConnection.
Regards
Michal
As I remember topics from this forum, if you use thread application each thread needs to have its own UniConnection.
Regards
Michal
-
- Posts: 451
- Joined: Wed 19 Jan 2005 09:59
Re: postgresql issues
This will maybe solves postgresql issues but I'll then get SQLite "Database is locked" errors !As I remember topics from this forum, if you use thread application each thread needs to have its own UniConnection.
Re: postgresql issues
FCS is right. A separate TUniConnection instance must be used for each thread in a multi-threaded application.
For this, you can create TUniConnection components for each thread in the Datamodule - and pass each TUniConnection component to its thread. You can also create a separate TUniConnection instance in each thread at run-time.
For this, you can create TUniConnection components for each thread in the Datamodule - and pass each TUniConnection component to its thread. You can also create a separate TUniConnection instance in each thread at run-time.
-
- Posts: 451
- Joined: Wed 19 Jan 2005 09:59
Re: postgresql issues
My WorkerThread is now creating an TUniConnection at runtime for anything else then SQLite provider.
I'll test this and report any problem
I'll test this and report any problem
-
- Posts: 451
- Joined: Wed 19 Jan 2005 09:59
Re: postgresql issues
Hello,
Dispite having created a new TUniConnection object within my thread, I'm ramdomly getting :
Dispite having created a new TUniConnection object within my thread, I'm ramdomly getting :
Anyone at Devart can enlight me where to start debugging this ?'first chance' Exception at $7514812F. Exception Class EPgError with message 'Unexpected server response :
Re: postgresql issues
Could you send a small sample reproducing the described exception to andreyz*devart*com?
-
- Posts: 451
- Joined: Wed 19 Jan 2005 09:59
Re: postgresql issues
Hello Andrey,
I'll will try a reproducible pattern. Right now I don't know why this is happening and how to reproduce it.
Best regards,
Stéphane WIERZBICKI
I'll will try a reproducible pattern. Right now I don't know why this is happening and how to reproduce it.
Best regards,
Stéphane WIERZBICKI
Re: postgresql issues
We will wait for your sample. If you have any additional questions concerning UniDAC, please contact us.