Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
shaikbakshu
Contributor
Contributor

How to Fetch DB name from connection string into excel sheet in qlikview

Hi All,

Can you please tell me,

I have a requirement to how to fetch DB name from connection string in Excel sheet or text object.

My Requirement is i have one connection string by using ODBC / OLE DB  connection type in script.

I want a database(DB) name from that connection string.

EXample:

ODBC CONNECT TO (ORA-XXXX;DBQ=XXXXX) (XUSERID IS , XZXXXXXXXX PASSWORD IS ,XXXXXXXX);

In the above Connection string i want a ORA name and DBQ name.

Could you any one help me to this scenario, and please tell me to any code is there for fetching this information to Excel or any another Qlikview Object. And have any run macro for this information retrieve to tables object or any qlikview object.

Regards,

Bakshu.

2 Replies
Anonymous
Not applicable

after creating connection with the database , u have to select sql statement as shown below

ODBC CONNECT TO cipla_devl (XUserId is KIPEVZFMND, XPassword is CYeFbZFMAKMSDcUGaE);

select DB_Name() as dbname,

DB_Name() is use to fetch current database name and store it under dbname field

;

balabhaskarqlik

In OLEDB connection, Data Source (server IP), Initial Catalog(DB Name), used to appear normally, without encryption.