1. Daniel Ferrreira
  2. PowerBuilder
  3. Wednesday, 3 April 2024 14:23 PM UTC

Hi guys,

sorry for the trivial question, but I'm getting an error that I haven't figured out yet.

This is my script, to get some mySQL data:

string ls_mySQLDataDir, ls_sql = 'SELECT @@datadir'

DECLARE dynCursor DYNAMIC CURSOR FOR SQLSA;
PREPARE SQLSA FROM :ls_sql;
OPEN DYNAMIC dynCursor;
Fetch dynCursor Into :ls_mySQLDataDir;
CLOSE dynCursor;

When it reaches the "open dynamic", I get this error message:

PowerBuilder application execution error (R0020)
Application terminated.
Error: Database command not successfully prepared at line 31 in function of_get_os_info of object nvo_os_info.

I have tried a different command, like "select @@version", but it yields the same result.

Any ideas?

Thanks!!!

Accepted Answer
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 3 April 2024 16:00 PM UTC
  2. PowerBuilder
  3. # Permalink

Hi Daniel;

   Why not just use a DataWindow? The DWO will do all this DML work for you!!!   ;-)

Food for thought.

Regards .. Chris

Comment
  1. Daniel Ferrreira
  2. Wednesday, 3 April 2024 16:28 PM UTC
Thanks Chris.

Done that and problem solved! :)
  1. Helpful 1
  1. Chris Pollach @Appeon
  2. Wednesday, 3 April 2024 16:31 PM UTC
LOL .. don;t forget to HUG your DataWindow today! ;-)
  1. Helpful
There are no comments made yet.


There are replies in this question but you are not allowed to view the replies from 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.