Click here to Skip to main content
15,867,330 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i tried some methods but it not working i using pyodbc for python to connect to tally odbc i tried the dsn also but didn't work please help me out!

What I have tried:

>>> import pyodbc
>>> conn = pyodbc.connect('DSN=TallyODBC64_9000;SERVER=({local});DRIVER=Tally ODBC DRIVER64;PORT=9000')
Traceback (most recent call last):
File "<pyshell#1>", line 1, in <module>
conn = pyodbc.connect('DSN=TallyODBC64_9000;SERVER=({local});DRIVER=Tally ODBC DRIVER64;PORT=9000')
pyodbc.InterfaceError: ('IM002', '[IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified (0) (SQLDriverConnect)')
>>>
Posted
Updated 17-Apr-19 3:08am

See Connecting to databases · mkleehammer/pyodbc Wiki · GitHub[^] and follow the links to check the specific format of the connection string.
 
Share this answer
 
The above problem is due to cross-platform incompatibility, everything from python to tally needs to be 64-bit or 32-bit

You need to do the following Steps

1. Install 64-bit version of Tally and Python
2. Run Tally as Administrator
3. Check in DSN whether the Tally ODBC platform is 64 bit

Now run your code it will work perfectly
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900