Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Highlighted
Not applicable

multiple ODBC connections in one QVW file

How do i connect to multiple databases within one qvw file? can there be more than one connect statments in qvw script?

1 Solution

Accepted Solutions
MVP & Luminary
MVP & Luminary

Re: multiple ODBC connections in one QVW file

You can use multiple connects, but there is only one connection active at a time. A CONNECT statement will do a disconnect of any existing connect, or you can explicity DISCONNECT. So something like this:

CONNECT DB1

SQL SELECT ..

CONNECT DB2

SQL SELECT

-Rob

2 Replies
MVP & Luminary
MVP & Luminary

Re: multiple ODBC connections in one QVW file

You can use multiple connects, but there is only one connection active at a time. A CONNECT statement will do a disconnect of any existing connect, or you can explicity DISCONNECT. So something like this:

CONNECT DB1

SQL SELECT ..

CONNECT DB2

SQL SELECT

-Rob

Not applicable

Re: multiple ODBC connections in one QVW file

Thanks Rob!