Search code examples
powerbuilder

PowerBuilder 7 retrieval argument declaration


I'd like to know how and where I should declare the variable that will be passed to the SQL query. I have already declared it here:

data window

I can't seem to properly declare it in the window part. I have already tried declaring it based on the available samples on the existing system.

window

p.s. arg_enccode is now declared globally

p.s.s It's kind of working now, but i still get this message even though the variable that passed was received by the MySQL Query and my intended results came out. I've already tried renaming the arguments and variables to maybe match things up, but still to no avail. Is there something I missed?


Solution

  • There doesn’t need to be a naming link between the argument declaration and what’s in the script. Think of it like passing a value to a function (because that’s exactly what’s going on). You could either pass a hard coded value

    dw_1.Retrieve (“doctors_orders”)
    

    or you can pass the contents of a variable

    string ls_ValueForDW
    ls_ValueForDw = “doctors_orders”
    dw_1.Retrieve (ls_ValueForDW)
    

    Anticipating the next step, I’d advise capturing the integer return of Retrieve() into a variable so you can at least see it in the debugger.

    Good luck.