Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
shaikbakshu
Contributor
Contributor

How to Extract Connection String DateBase name into Excel sheet when .QVW application is reload?

Hi All,

Please any one tell me to,

How to Extract Connection string Database name in Qlikview Scripting and this connection string Database name export to Excel sheet.

Connection String:

ODBC CONNECT TO [xe;DBQ=xe] (XUserId is YJBOAUJOeA, XPassword is ZNBMOUJOeD);

The above connections string, we have a requirement to Export this connection string Database name into Excel or any other object.

Database is : DBQ=xe

so can you any one please tell me the solution of this issue.

Regards,

Bakshu.

3 Replies
Anil_Babu_Samineni

Try this?

=SubField(TextBetween('ODBC CONNECT TO [xe;DBQ=xe] (XUserId is YJBOAUJOeA, XPassword is ZNBMOUJOeD);','[',']'),';',-1)

Or


SET Connection = 'ODBC CONNECT TO [xe;DBQ=xe] (XUserId is YJBOAUJOeA, XPassword is ZNBMOUJOeD);';


Use this to get that?

=SubField(TextBetween($(Connection),'[',']'),';',-1)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
shaikbakshu
Contributor
Contributor
Author

Hi Anil,

Thank you for replay,

My requirement is i was use data model through Binary load. i want connection string Database name with in the binary load .QVW file.

Ex:

Binary ;

I want the above Binary load datamodel convertion.qvw file Connection string Database name.

Why because i call the datamodel convertion.qvw file by passing variables.

Means

BINARY [$(QVW_Dir)\$(Tab).qvw];

When load this .QVW file then after or before i want to  Export above Binary load  connection string Database name

like "DBQ=xe"

Could you please help me to this.

Regards,

Bakshu.

Anil_Babu_Samineni

You can do work around using another table to get that into variable?

SET Connection = 'ODBC CONNECT TO [xe;DBQ=xe] (XUserId is YJBOAUJOeA, XPassword is ZNBMOUJOeD)';

Load SubField(TextBetween('$(Connection)','[',']'),';',-1) as Connection AutoGenerate 1;


Note - you can use now Binary Load

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful