Quick View of Collections Using the Query
The collection is an essential and crucial artefact. This artefact enables developers to pull or fetch data from TallyDataBase. Tally’s database architecture follows an Object-Oriented Database Management System (OODBMS). Hence it allows connecting to any external database easily. To ensure data is available to other databases within Tally, we need to enable ODBC and provide a Port.
Enable ODBC in Tally
- Open TallyPrime
- Click on F1:Help > Settings > Connectivity
- From ‘List of Configurations,’ press enter on ‘Client / Server Configuration.’
- Set ‘Yes’ to Enable ODBC. The default port number is 9000. If a user needs to change the port, they may do the same
Calling in Excel
The simplest and easiest way is to call the Database query through Excel. As a developer/user, it is not required to know the Table name. All the exposed Tables are list in the Database query Table listing. The user only needs to select the Table and required methods from the list.
Steps to extract data in Excel:
- Open MS Excel > Select Data Menu
- Click on Get Data > From Other Sources > From ODBC
- ODBC query wizard shall open and choose TallyODBC as Data Source Name
- Select the Table name, and a preview of the data is available. Click on Load, and all the data shall be extracted to Excel Sheet. The connectivity is live, and the database would be updated every time the ‘Refresh’ button is clicked.
Calling in TallyPrime Calculator
Tally is a very flexible product. The calculator pane in Tally accepts SQL queries/commands and returns the output/results. Open Tally > Open a Company > Press Ctrl + N to activate the calculator.
SQL queries can be executed at the calculator pane to fetch first level information. By default, all internal collections are exposed to ODBC. A TDL collection is required to be exposed to ODBC for fetching through ODBC. An attribute ‘Is ODC Table’ at collection definition should be set to ‘Yes’ to expose a collection to ODBC.