List the databases of a ODBC, OLEDB or CUSTOM connection
List the databases of a ODBC, OLEDB or CUSTOM connection by using the GetDatabases method or the GetDatabasesFromConnectionString method.
Examples
Example 1:
The handle of the request is 1 because the GetDatabases method applies at app level.
The identifier of the connection is 8CD9E620-29BEFE42-2C8AA843-9A1156C5-3D89B173.
The client sends:
{
"jsonrpc": "2.0",
"id": 4,
"method": "GetDatabases",
"handle": 1,
"params": [
"8CD9E620-29BEFE42-2C8AA843-9A1156C5-3D89B173"
]
}
The engine returns:
{
"jsonrpc": "2.0",
"id": 4,
"result": {
"qDatabases": [
{
"qName": "AdventureWorks"
},
{
"qName": "AdventureWorksDW"
},
{
"qName": "BetsysBikes"
},
{
"qName": "BigColumn"
},
{
"qName": "CircularReference"
},
{
"qName": "Config_ODBC"
},
{
"qName": "dbgen5Gb"
},
{
"qName": "FanTrap"
},
{
"qName": "large_data"
},
{
"qName": "LinkedTablesData",
"qIsDefault": true
},
{
"qName": "Many_Tables"
},
{
"qName": "master"
},
{
"qName": "mellan slag"
},
{
"qName": "msdb"
},
{
"qName": "New_Test"
},
{
"qName": "Northwind"
},
{
"qName": "pen"
},
{
"qName": "Population"
},
{
"qName": "QVPR_Raleigh_HOD"
},
{
"qName": "sandbox"
},
{
"qName": "SongsAndAlbums"
},
{
"qName": "SynKey"
},
{
"qName": "tempdb"
},
{
"qName": "Test"
},
{
"qName": "Tweets"
}
]
}
}
The list of the databases is displayed.
Example 2:
The handle of the request is -1 because the GetDatabasesFromConnectionString method applies at global level.
- The name of the connection is qasql_intetest_QV and the type ODBC.
- The connection string is ODBC CONNECT TO qasql_intetest.
- The user name and the password of the connection are given.
The client sends:
{
"jsonrpc": "2.0",
"id": 6,
"method": "GetDatabasesFromConnectionString",
"handle": -1,
"params": [
{
"qName": "qasql_intetest_QV",
"qMeta": {},
"qConnectionString": "ODBC CONNECT TO qasql_intetest",
"qUserName": "Qlik",
"qPassword": "QlikPassword",
"qType": "ODBC"
}
]
}
The engine returns:
{
"jsonrpc": "2.0",
"id": 6,
"result": {
"qDatabases": [
{
"qName": "_Database"
},
{
"qName": "AdventureWorks"
},
{
"qName": "AdventureWorksDW"
},
{
"qName": "Data_base"
},
{
"qName": "master"
},
{
"qName": "msdb"
},
{
"qName": "Qtest_pla"
},
{
"qName": "QVPR-NHG"
},
{
"qName": "QVPR-test"
},
{
"qName": "Software Manager Database"
},
{
"qName": "tempdb"
},
{
"qName": "Wise Services Database"
}
]
}
}
The list of the databases is displayed.