Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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
Partner - Specialist
Partner - Specialist

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.