Recent

Author Topic: Access violation with TDataSet.Refresh?  (Read 6180 times)

tatamata

  • Hero Member
  • *****
  • Posts: 787
    • ZMSQL - SQL enhanced in-memory database
Access violation with TDataSet.Refresh?
« on: August 19, 2018, 10:10:51 am »
Working in CodeTyphon version 6.50 and development version 6.54 (FPC 3.1.1) with Postgresql database. TSQLQuery.Refersh always raises access violation error, either through code, either by clicking refresh button in DBNavigator. With previous version of CodeTyphon everything was OK.
I think something is  wrong, very wrong, with TDataSet.Refresh.
Have somebody else experienced such troubles with Refresh method?

tatamata

  • Hero Member
  • *****
  • Posts: 787
    • ZMSQL - SQL enhanced in-memory database
Re: Access violation with TDataSet.Refresh?
« Reply #1 on: March 09, 2020, 01:10:31 pm »
Coming back to this issue - working with Postgresql, when refreshing sqlquery through dbnavigator, there is always access violation.
What could be possible reason?

tatamata

  • Hero Member
  • *****
  • Posts: 787
    • ZMSQL - SQL enhanced in-memory database
Re: Access violation with TDataSet.Refresh?
« Reply #2 on: March 11, 2020, 04:32:39 pm »
This really drives me crazy, it cannot be that I am the only person having this issue with Postgresql and sqlqueries? Everythiing works nice until Refresh is triggered. When refresh is triggerred, access violation error occurs and if you afterwards position cursor on a record in dbgrid, all records are gone.
What could be the cause? Anybody else experienced such problems with Postgresql and Refresh?

Thaddy

  • Hero Member
  • *****
  • Posts: 14214
  • Probably until I exterminate Putin.
Re: Access violation with TDataSet.Refresh?
« Reply #3 on: March 11, 2020, 04:40:22 pm »
Well, add a simple example, preferably not relying on Lazarus but pure FPC, that reproduces the issue. Without code there is little we can do.
Note FPC 3.1.1 is a *very* old trunk version. Trunk has been 3.3.1 for years now. Better test with 3.0.4 (current release)  or 3.2.0 (in RC phase)  or a recent trunk.
Trunk versions need to be up-to-date. If you use it, You are responsible to keep it up-to-date.
If you do not know how to do that you should not attempt to use a trunk version in the first place: trunk versions are moving targets and also contain experimental code that may not even reach a release.
There is also no support for older trunk versions, only the latest and there have been many fixes since 3.1.1.
For your platform there is a pre-packaged 3.2.0 RC available.
« Last Edit: March 11, 2020, 04:51:28 pm by Thaddy »
Specialize a type, not a var.

 

TinyPortal © 2005-2018