Hi
I have a for loop, looping through and connecting to different databases which it reads from an excel file and concatenating the info in a table. After it runs through each connection with a different db, at the end of the last one the reload stops but the close button does not populate. When I click End here it will freeze my qlikview and I have to end task it.
Any help would be great.
Are you doing a store statement at the end where it freezes or is it just trying to extract the data?
I think its just extracting I didn't do a store statement.
Here is my code..
QCProjects:
LOAD ProjectName,
DatabaseName
FROM
(ooxml, embedded labels, table is Sheet1);
// fill variable with field values row by row
For i = 0 To NoOfRows('QCProjects')-1
let vDatabaseName=peek('DatabaseName', $(i),'QCProjects');
let vProjectName=peek('ProjectName', $(i),'QCProjects');
trace $(vDatabaseName) $(vProjectName);
// .......... use connection string
OLEDB CONNECT32 TO [Provider=SQLOLEDB.1;Persist Security Info=True;User ID=BI_QLIKVIEW;Initial Catalog=$(vDatabaseName);Data Source=SDBQCV1P;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=OPT0022;Use Encryption for Data=False;Tag with column collation when possible=False] (XPASsword is BLANK);
Let vDefectsTableName = 'Defects'; // Define Table Name
//Extract
$(vDefectsTableName):
// Load everything in to table variable
LOAD *;
SQL
// Get information from Table in database
SELECT '$(vProjectName)' AS ProjectName, bud.*
FROM td.BUD as bud;
/*Defect*/
next;
Exit Script;
Try doing a limited load like 1000 lines. Could be a hardware resource issue.
How do I do that Ajay? I am new to qlikview and programming which makes it even harder for me, to program.
thanks
Open your qvw > Go to Edit Script > on the tool bar there will be Debug > Limited Load > 1000 lines
Tried it but it does the same thing in debug as well, just freezes. Have to end task each time.
Turn on Doc Logging and put up the log file for us to see please.