Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
 Mahamed_Qlik
		
			Mahamed_Qlik
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi
I want to connect qlikview to my database using my connection string.
But, I want to save connection string in txt and i want to call this txt file in inlcude as below :
$(Inlcude= ..\Includes\Connection.txt);
So issue is, when I execute above script it is throwing an error of " there is no open data connection" but when I dont use this connection string txt file and I write full path as below then my script got executed correctly.
OLEDB CONNECT TO [Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Data Source=xxxxxxxxx;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=xxxxxxx;Use Encryption for Data=False;Tag with column collation when possible=False];
Please help asap.
 
					
				
		
 marcus_sommer
		
			marcus_sommer
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		There is a typo within your include-statement:
$(Inlcude= ..\Includes\Connection.txt);
 
					
				
		
 Mahamed_Qlik
		
			Mahamed_Qlik
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Sorry i was type within my query only..
I have checked and it is corrected in application but still same issue
 
					
				
		
 marcus_sommer
		
			marcus_sommer
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Then it seemed that your relative path isn't valide. The easiest way to get the proper relative path is to use the file-wizard with the enabled option to apply relative paths to load the include-file as a flat-file. You don't need to execute this load - just copy & paste the path from the from-statement and then remove the whole thing again.
Further useful is the use of must_include instead of include because then you will get an error-message if the access to the file failed.
- Marcus
.png) Brett_Bleess
		
			Brett_Bleess
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Here is Help link to Include, Marcus is correct in his explanation of things as well.
Here is a Microsoft link regarding relative paths as well:
https://docs.microsoft.com/en-us/dotnet/standard/io/file-path-formats
Regards,
Brett
