Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
pauljohansson
Creator III
Creator III

Referencing a include that contains a sub

Hi, 

I reference a .qvs(func_db_connect.qvs) from my script like this: 

$(Include=..\common\func_db_connect.qvs); 

This .qvs(func_db_connect.qvs) is a sub that in turn reference another .qvs (DB_Connect.qvs) 

SUB DB_CONNECT(ENVIRONMENT, DB)

$(Include=D:\QVStorage\BI_DEV\COMMON\DB\DB_Connect.qvs);

END SUB

DB_Connect.qvs is just a connection string.

When i take the code in DB_Connect and use it directly in the script - there is no problem. But when I call it as above, I dont manage to get a connection.  Anyone have any idea what the reason could be? Do i need to include func_db_connect.qvs in some different way since it containts parameters and since its a sub?? 

Any ideas are welcome, 

Thanks in advance,

br Paul

2 Replies
marcus_sommer

Are you sure that the path is correct and the qv-user has appropriate access rights? What showed the debugger - for each include variable will used a own debugger-tab and the log-file?

- Marcus

pauljohansson
Creator III
Creator III
Author

Thanks for you reply Marcus. I Couldnt find a proper solution to this one I think. I solved it by just referencing the .qvs with an include (neglecting the Sub Statement): //SUB DB_CONNECT(ENVIRONMENT, DB) $(Include=D:\QVStorage\BI_DEV\COMMON\DB\DB_Connect.qvs); //END SUB