Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
marco_puccetti
Partner - Creator
Partner - Creator

Qliksense Database Connection

Hello, i need to connect to a Database and to do this i have used this statement:

OLEDB CONNECT32 TO [Provider=SQLOLEDB.1;Persist Security Info=False;User ID=USER_ID;Data Source=DATA_SOURCE;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=M_WS_ID;Use Encryption for Data=False;Tag with column collation when possible=False];

This cause the following error:


CONNECTs other than LIB CONNECT are not available in this script mode: OLEDB CONNECT32 TO [Provider=SQLOLEDB.1;Persist Security Info=False;User ID=AAAAAAA;Data Source=XXXXXX;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=KKKKKKKI;Use Encryption for Data=False;Tag with column collation when possible=False]

Anybody knows how to solve this?

Thanks

6 Replies
Gysbert_Wassenaar

1. Use the Qlik Sense UI to create a connection for you that gets added to the libarary

2. Perhaps you can use your 'qlikview' connect statement if you enable the Legacy mode‌. I'm not sure this works. I haven't tried that yet.


talk is cheap, supply exceeds demand
marco_puccetti
Partner - Creator
Partner - Creator
Author

I have tried the ui to create the connection and i get this statement:

LIB CONNECT TO 'db';

the load statement that is generated is this:

LOAD A,

    B,

    C,

    D,

    E,

    F,

    G;

SQL SELECT A,

    B,

    C,

    D,

    E,

    F,

    G

FROM CATALOG.dbo.TABELLA;

but on qlikview i use this form that seems to not work under qliksense:

TABELLA:

SQL SELECT *

FROM $(M_GES_CAT).dbo.TABELLA;

I use also join expressions so is it possible to continue with the second form?

Thanks

Gysbert_Wassenaar

That's correct. Dollar expansion of variables in load/select statements does not work unless you revert to Legacy mode.


talk is cheap, supply exceeds demand
marco_puccetti
Partner - Creator
Partner - Creator
Author

How can i do to revert to legacy mode?

Thanks

Gysbert_Wassenaar

See point 2 of my first post in this discussion.


talk is cheap, supply exceeds demand