1. Daniel Vivier
  2. PowerBuilder
  3. Tuesday, 21 June 2022 15:25 PM UTC

I had a really weird report from a user yesterday, in a screenshot of an error message from the dberror event of our inherited Transaction object. 

They were doing an action that did an Insert to a table using a DW on a window (code like dw_main.Update()) and the SQL shown in the error text was wrong: a column name "duedate" showed up in that SQL as "duatate". It is definitely "duedate" in the DW definition. And when the user tried that exact same action again a 2nd time, it worked with no problem. They are using our latest release, and nobody else is reporting this error.

We are at a loss as to how something like that could possibly happen. There is no code that we wrote that intentionally hacks the SQL before executing it.

The database is Firebird SQL, embedded version, in case that could be relevant (though I don't see how).

Has anyone else seen anything at all like this? Any ideas how, why or when it happens? Thanks.

Sivaprakash BKR Accepted Answer Pending Moderation
  1. Friday, 24 June 2022 07:53 AM UTC
  2. PowerBuilder
  3. # 1

May be due to virus in that particular system, which randomly modifies queries?   May be a virus that affects Firebird exclusively...

Happiness Always
BKR Sivaprakash

Comment
There are no comments made yet.
Brad Mettee Accepted Answer Pending Moderation
  1. Wednesday, 22 June 2022 14:23 PM UTC
  2. PowerBuilder
  3. # 2

Have you considered faulty memory module? This looks like a case of flipped bits. The 'e' turned into an 'a' (0x65 -> 0x61), and the 'd' turned into a 't' (0x64 -> 0x74) because of a single bit each.

 

Comment
There are no comments made yet.
Olan Knight Accepted Answer Pending Moderation
  1. Tuesday, 21 June 2022 20:17 PM UTC
  2. PowerBuilder
  3. # 3

Put code inthe SQLPREVIEW event on the DW to be able to stop and look at what is being sent to the database.

You could event code something like:
   ll_pos = POS (sqlsyntax, "duatate", 1)
IF (ll_pos > 0) THEN

   // ..... code to stop in DEBUG mode and examine the data and the call stack.

END IF

Comment
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 21 June 2022 19:30 PM UTC
  2. PowerBuilder
  3. # 4

Hi Dan;

  Maybe a corrupt local DB?

Regards .. Chris

Comment
  1. Daniel Vivier
  2. Tuesday, 21 June 2022 20:15 PM UTC
But is the DB even consulted before constructing the SQL command to send to it, which is what was apparently weirdly modified? I always assumed that part of the Update() process was entirely done by PB code and it was only after the commands were constructed that they were sent to the DB for execution.
  1. Helpful
  1. Roland Smith
  2. Tuesday, 21 June 2022 20:32 PM UTC
Do you have StaticBind set on? Try doing a dbtrace, perhaps it will shed light on it.
  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.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.