Skip to Content
avatar image
Former Member

A novice question

I have a blob column in a data window, OLEdatabaseBLOB, that enables me to retrieve, update, and store an MS Word doc. If I hard code the key value in the key clause, works fine. If I switch to a variable (e.g., :job_id), it doesn't resolve. The SQL shows the key value as "?", null. So here's the dumb question, how do I pass a value to the variable in the key clause? I've tried doing it several ways through the data window arguments but to no avail.


Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Best Answer
    avatar image
    Former Member
    Apr 18, 2016 at 01:35 PM

    Hi James;

    This is super easy with the DW OLE Column mapping and yes, a little tricky if you have not done this before. I'll walk you through it - here are the steps I use:

    1) Create a Table with a blob column defined inside it.

    Here is what I am using for this walk through (SQLAnyWhere - Long Binary column) ...

    2) Create a new DW and set a Retrieval Argument on the key column, as follows:

    - ID => :ID in my example ...

    3) Add an OLE Column to your new DWO, as follows:

    4) Map the OLE Column to the DB Table Blob column, as follows:

    5) Chris's Trick ... User won't see any OLE on Row Insert!

    Thus, use this tip ... add a picture, place in back, slide behind OLE space:

    6) Actual test ...

    - Insert new row

    - Double-Click icon

    - Add MS-Word text

    - File=>Close&Return (menu)

    Last but not least, select the SAVE option in the DW Painter. Update () of course in your PB code.😉


    Regards ... Chris

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      Hi James;

      Excellent news & you are most welcome! 😊

      Reminds me of a great TV commercial slogan ... "An educated consumer is out best customer"! 😉

      Regards ... Chris

      PS: Good luck on the rest of your PB project!

  • Apr 18, 2016 at 12:20 PM

    A question mark is shown when the DisableBind database parameter is not set.

    But this does not mean that your SQL will fail.

    Take a look at the your PowerBuilder help for further informations.

    SyBooks Online (Archive) - DisableBind

    SyBooks Online (Archive) - SQL Preview



    Add comment
    10|10000 characters needed characters exceeded