# bind variable and export wizard error message

**URL:** <https://forums.toadworld.com/t/bind-variable-and-export-wizard-error-message/6365>\
**Category:** Toad Data Point & Toad Intelligence Central\
**Created:** [October 19, 2010, 3:24pm UTC](https://forums.toadworld.com/t/bind-variable-and-export-wizard-error-message/6365 "2010-10-19T15:24:47Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dave.williamsxerox.c](https://avatars.discourse-cdn.com/v4/letter/d/db5fbb/32.png) [@dave.williamsxerox.c](https://forums.toadworld.com/u/dave.williamsxerox.c)\
**Post date:** [October 19, 2010, 3:24pm UTC](https://forums.toadworld.com/t/bind-variable-and-export-wizard-error-message/6365/1 "2010-10-19T15:24:47Z")

</div>

Receiving an error message when using a bind variable.

Export Wizard is returning this message:

Thread (8) Export Started [10/19/2010 12:48:57 PM]

Thread (8) Export Wizard error processing objects, export halted.

Thread (8) Error parsing Export template: Object reference not set to an instance of an object.

Thread (8) Export Finished [10/19/2010 12:48:57 PM]

The sql query is:  
SELECT PRODUCT.PRODUCT\_ID, PRODUCT.PRODUCT\_FAMILY\_ID, PRODUCT. **“NAME”** FROM MES2.PRODUCT PRODUCT  
WHERE (PRODUCT. **“NAME”** = :a)

Using Toad for Data Analysts 2.6.2.580

---

<div class="post-metadata">

**Author:** ![Debbie\_Peabody](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/debbie_peabody/32/18_2.png) [@Debbie\_Peabody](https://forums.toadworld.com/u/Debbie_Peabody)\
**Post date:** [October 19, 2010, 5:24pm UTC](https://forums.toadworld.com/t/bind-variable-and-export-wizard-error-message/6365/2 "2010-10-19T17:24:15Z")

</div>

The Export wizard does not support bind variables. We have an outstanding CR (852664) for this enhancement. You can however, use the automation window. It supports binds.

To use, add a ‘Set Variable Activity’ and define a variable with the same name as in your query. Set the value. This can be hardcoded or set by another select statement. Then use the Export to File activity and it will bind your value.

Debbie

---

<div class="post-metadata">

**Author:** ![dave.williamsxerox.c](https://avatars.discourse-cdn.com/v4/letter/d/db5fbb/32.png) [@dave.williamsxerox.c](https://forums.toadworld.com/u/dave.williamsxerox.c)\
**Post date:** [October 21, 2010, 9:59am UTC](https://forums.toadworld.com/t/bind-variable-and-export-wizard-error-message/6365/3 "2010-10-21T09:59:50Z")

</div>

I modified the code to:

–TOAD: SET v\_product = ‘123’ SELECT PRODUCT.PRODUCT\_ID, PRODUCT.PRODUCT\_FAMILY\_ID, PRODUCT. **“NAME”** FROM MES2.PRODUCT PRODUCT WHERE PRODUCT. **“NAME”** LIKE :v\_product but I am unable to get rid of this problem.Error message:Information:10/21/2010 7:30:08 AM 0:00:00.000: Incorrectly formatted set command (v\_product = ‘123’)TRIAL.sql:1: --TOAD: SET v\_product = '123’The popup window for entering the value does not match the value of ‘123’.The query does run okay, but when trying to move into Export it fails because of the error message.  
I apologize, but any insights on what the problem might be other than not understanding what you said.

Thanks.

---

<div class="post-metadata">

**Author:** ![dave.williamsxerox.c](https://avatars.discourse-cdn.com/v4/letter/d/db5fbb/32.png) [@dave.williamsxerox.c](https://forums.toadworld.com/u/dave.williamsxerox.c)\
**Post date:** [October 21, 2010, 4:28pm UTC](https://forums.toadworld.com/t/bind-variable-and-export-wizard-error-message/6365/4 "2010-10-21T16:28:47Z")

</div>

My error. I was trying to do this in Export rather than Automation. I got it to work in automation fine. Discovered my mis-reading of the suggestion when I found another user asking about the same thing. Now, off to the races!

---

<div class="post-metadata">

**Author:** ![Debbie\_Peabody](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/debbie_peabody/32/18_2.png) [@Debbie\_Peabody](https://forums.toadworld.com/u/Debbie_Peabody)\
**Post date:** [October 21, 2010, 4:35pm UTC](https://forums.toadworld.com/t/bind-variable-and-export-wizard-error-message/6365/5 "2010-10-21T16:35:15Z")

</div>

Excellent!
