Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
tosandeep10
New Contributor II

Create data connection string at runtime ..

Hi Guys,


I am working on a QV report, in which I have a List Box of some string type. Each value is associated with a data connection string in sql.

e.g. My list have these values .

123_ABC_12

456_ABC_34

789_ABC_56

147_ABC_14

when I select first value connection string would be like:

OLEDB CONNECT TO [Provider=SQLOLEDB.1;Persist Security Info=False;User ID=123_ABC_12;Initial Catalog=123_ABC_12;Data Source=server name;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=NDHD201283;Use Encryption for Data=False;Tag with column collation when possible=False];

and password is : 123_ABC_12

So I want data connection would be dynamic.

Plz help......

Thanks

Sandeep

1 Reply
bbi_mba_76
Valued Contributor

Re: Create data connection string at runtime ..

Hi,

I use a chart with an expression to create the connection string, then a macro save to a txt file and then in the script I include the file.

Community Browser