Toad World® Forums

Toad data point 3.5 - use of variables in import wizard

I have some sql scripts that use variables to update tables in my database. I currently run them as execute to file activities within an automation script. While testing TDP 3.5, I attempted to simply drop these scripts in an import activity using the same variables - #variable#.

However, when I attempt to click next on the Enter Query screen, I get an error:


It seems like the wizard is trying to pass the tdp variable to the AS400 instead of translating the variable into the actual value and then passing it to the database. I am using one of the new IBM DB2 iseries connections to run the script. Maybe this feature is not available for iseries? If anyone has any insights I would appreciate it.

After a little playing around, it looks like I can use “:” in front of the variable now (even for a number) instead of using the # #.

Yes, that would work as now they are bound by the server and not replaced as literals.

Well, I abandoned tdp3.5 for a time, but I am trying it out again. My solution from April 22 still works fine, but only if I am using 1 variable in my query. As soon as I put in a 2nd, I get an error: “Error importing data, please check file format options.” and “Object reference not set to an instance of an object” Not sure why adding the 2nd variable would do this. Any thoughts?

Also, when I go to set up the import template, I am prompted to input variable values, which causes no problems, and I am also able to preview the data. The only problem comes when I attempt to run the automation script. If I attempt to run the import template on it’s own, I do not get prompted to enter variable values and the template doesn’t work. So something is going on here with the import template.

can you send me the automation script, the import template, and the last automation log run with verbose turned on?

Debbie - I finally got a chance to put together a better test case for this issue. I am sending you files by email.

I have the files and looking at them today. I will respond after consulting with Igor.