Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

marco_puccetti
Contributor

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

Re: Qliksense Database Connection

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
Contributor

Re: Qliksense Database Connection

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

Re: Qliksense Database Connection

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
Contributor

Re: Qliksense Database Connection

How can i do to revert to legacy mode?

Thanks

Re: Qliksense Database Connection

See point 2 of my first post in this discussion.


talk is cheap, supply exceeds demand
undergrinder
Valued Contributor II

Re: Qliksense Database Connection