Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
mellerbeck
Creator II
Creator II

Any way of sending "Application Name=MyAppName;" string for the ODBC connection

This would be useful to be able to see on the server which Qlikview is using resources etc...

8 Replies
Jason_Michaelides
Luminary Alumni
Luminary Alumni

Sure:

LET vConnString = 'first part of connection string' & Documentname() & 'second part of connection string';

Then, whenever you need to connect:

CONNECT TO $(vConnString);

Hope this helps,

Jason

mellerbeck
Creator II
Creator II
Author

How does that work in conjuntion with the encrypted username / password.

i.e.

I have

ODBC CONNECT TO QVReports (XUserId is blahblah, XPassword is blahblah);

How to convert to vConnString?

Not applicable

i don't think you can do that with ODBC. You can with OLE DB.

Jason_Michaelides
Luminary Alumni
Luminary Alumni

That's just part of the second half of the conmection string.

Jason_Michaelides
Luminary Alumni
Luminary Alumni

Although Juan may be right...can't test right now and I can't remember if I used this before on ODBC or OLE DB.

mellerbeck
Creator II
Creator II
Author

Anyone have an example for me for how they do their connection strings? (best practices?) Do you store them in a file? Are you sending the Application Name=MyApp to help on the sql side of things. Do you prefer OLE DB versus ODBC?

Jason_Michaelides
Luminary Alumni
Luminary Alumni

I use a config .xls file with environments (servernames, document paths, connection strings etc) and all my QVWs have a config tab which loads from this spreadsheet into multiple variables.  I can't post an example here just yet but will try to do so either tonight or tomorrow for you.

mellerbeck
Creator II
Creator II
Author

Thanks Jason! Would love to see your examples!