Toad World® Forums

Device attached to the system is not functioning error - ends while loop

When running a script that places files on a mapped drive the while loop ends and fails. It is looping through a sql query for a list of values and it appears to end at the same one each time, but error says ‘device attached to the system is not functioning’. When I run the query to another mapped drive it works. Is it a buffer issue?

– 11/18/2010 8:44:16 AM: Open Order Excel output per Rep.log: Variable value = 104292
– 11/18/2010 8:44:16 AM: Open Order Excel output per Rep.log: Variable “CommRec” set to “#RepTable.CommRec#”
– 11/18/2010 8:44:16 AM: Open Order Excel output per Rep.log: **Variable value = Summit Tek LLC

**-- 11/18/2010 8:44:22 AM: Open Order Excel output per Rep.log: Variable value = 120345
– 11/18/2010 8:44:22 AM: Open Order Excel output per Rep.log: Variable “CommRec” set to “#RepTable.CommRec#”
– 11/18/2010 8:44:22 AM: Open Order Excel output per Rep.log: **Variable value = 0

Oddly, the failure is happening after it assigns an incorrect value of ‘0’ above - but this processess fine when ran to another mapped drive.
**I can send the automation script and sql queries to your e-mail.

Thanks, Christy Mesenburg

I should add, it processes and creates output for 25 of the 30 reps before it fails. So the mapped drive and security is working.

Please run the script with verbose logging turned on. Send me the log file as well as Automation script and dependant files. I will take a look.

Debbie

I think the issue has to do with the values being returned from the driving query. When we are processing row 42 in the loop the CommRec value is 0. I do some parsing when setting variables so there may be an error in the code this is triggered by the content of that field. This value is also being used in the folder and file name and since it has no value it may be causing the drive error.

Executing activity Loop_row_1 using row 42
Variable “CommNum” set to “#RepTable.CommNum#”
Variable value = 120345
Variable “CommRec” set to “#RepTable.CommRec#”
Variable value = 0

If the issue is driven by the contents of the value you can surround the value in quotes.

select ‘"’||address_id||’"’ from ADDRESS

The quotes will cause the parsing code to leave this alone.

Try that and see if that changes things.

Debbie

I have Toad for Data Analyst 2.7.0.348. I am getting the same error. But my process is an export from an oracle table into a MS Office 2007 Exel file that is located on sharepoint. This export process is set up as an automation script. I have ran this .tas file numerous times, since 4/1/2012, daily. And as of today, 8/8/2012, I am getting this error. My export query is simple; SELECT * FROM table. The number of columns, length of column, and datatypes for each field has not changed.

Please provide assistance, if possible.

Can you turn on verbose logging, run the script and send me the log file?

Debbie
dpeabody@quest.com

I changed my process. It is still two export .txp files. Each mapped to separate worksheets within the Excel (.xlsx) file, located on sharepoint. The process that was changed is creating a new Excel file on sharepoint. My automation script is the same. Both export (.txp files) have the export query SELECT * FROM table.
I have attached two documents. The Failed_Log.txt contains my recent log with the Failed message (I did have the setting to Verbose). The second document is a word document that displays the error message of the Excel file on sharepoint, when opened. This condition of the Excel file is after the automation script process is ran on TDA.
Failed_Log.txt (139 KB)

I changed my process. It is still two export .txp files. Each mapped to separate worksheets within the Excel (.xlsx) file, located on sharepoint. The process that was changed is creating a new Excel file on sharepoint. My automation script is the same. Both export (.txp files) have the export query SELECT * FROM table.
I have attached two documents. The Failed_Log.txt contains my recent log with the Failed message (I did have the setting to Verbose). The second document is a word document that displays the error message of the Excel file on sharepoint, when opened. This condition of the Excel file is after the automation script process is ran on TDA.
Sharepoint Excel_File_Corrupted.docx (21.7 KB)