Skip to Content
author's profile photo Former Member
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.

James

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on 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.😉

    HTH

    Regards ... Chris


    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on 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

    hth

    Arnd

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.