Retrieving SQL Connection Data with Golang via C++
Contents
[
Hide
]
Aspose.Cells can help you retrieve SQL connection data. This includes any and all data that is required to make a connection to the SQL server, for example, server URL, username, table name, full SQL query, query type, location of the table, and name of the named range associated with it.
In Microsoft Excel, connect to a database by:
- Click the Data menu and select From Other Sources, then From SQL Server.
- Select Data, then Connections.
- Use the Connections wizard to connect to the database and create a database query.
Aspose.Cells provides the Workbook::get_DataConnections() method for retrieving external connections. It returns a collection of ExternalConnection objects in the workbook.
If the ExternalConnection object contains SQL connection data, it can be type‑cast to a DBConnection object and its properties can be used to retrieve the database command, command type, connection description, connection information, credentials, and so on.