jdbc odbc driver - ms-access

When i go to data sources in control panel and click on ms access driver. I get an error.. i.e.
setup routines for ms access driver odbc driver cannot be found? Wha'ts wrong?

Try re registering ODBCCONF.DLL by running the command “regsvr32 odbcconf.dll”. We had this on one computer once and it fixed it so might work for you

Related

Unable to connect via ODBC in Excel (while connection test works fine)

Since I don't like reading long questions myself I'll make it quick and dirty:
Starting Point:
MySQL DB on Server
Win10 machine with Excel (Office 365)
ODBC Driver installed
Test with ODBC connector works fine:
Goal:
Connecting from Excel to the DB via ODBC
Problem:
When choosing the DSN, the following error appears:
!BUT! I can connect from other workstations just fine (same setup/credentials).
Checklist:
IP from this (and other workstations) are allowed on the server (and are correct)
Excel and drivers are all 32 bit (checked on excel 64 with correct driver, same problem)
Since the connection test is successful, the login credentials are obviously correct
Steps taken in excel:
open Excel
choose ODBC:
choose saved (and tested) connection and press "ok":
No further steps are taken within excel.
What else could I check? What am I missing here?
The error message shows that MySQL is receiving esa as the username. Double-check that your DSN does not have the wrong username value saved.
I'm guessing that your Windows, Excel, and intended ODBC driver are all 64-bit.
You might have a 32-bit User DSN that's getting in the way of a 64-bit User DSN; best to only use System DSNs on 64-bit Windows, as discussed here. Be sure to use both 32-bit and 64-bit ODBC Administrators (C:\Windows\SysWoW64\odbcad32.exe and C:\Windows\System32\odbcad32.exe, respectively) to check.

Errors occur when set MySQL ODBC

Errors occur when set MySQL ODBC.
My operating system is win10 x64 and my MySQL Server version is 5.5. My Connector ODBC version is 5.3.
When I establish OBDC, the connection test is successfully, just as the following image.
However, when I click the "OK" button, there comes an error. The DSN is invalid.
I have refered some websites and tutorials, but still can not solve the problem.
Do not name your Datasource ODBC. Try Foobar, or abc, it should work. For whatever reason, the string ODBC cannot be used as DSN. This does not depend on the driver used.

pyodbc + MySQL + Windows: Data source name not found and no default driver specified

I am trying to connect to MySQL 5.6 on a Windows Server 2008 R2 localhost with pyodbc. I used the full installation for the MySQL instance on the localhost, including the ODBC connector. I have it connecting to a remote SQL Server instance beautifully, but for the life of me I can't get it to connect to the local MySQL instance. I am using this guide from connectionstrings.com as reference.
Here's some code:
import pyodbc
def create_mssql_conn():
return pyodbc.connect(r'Driver={SQL Server};Server=MSSQLSRV;Database=ecomm;Trusted_Connection=yes;')
def create_mysql_conn():
return pyodbc.connect(r'Provider=MSDASQL;Driver={MySQL ODBC 5.6 UNICODE Driver};Server=127.0.0.1;Database=ecomm;User=root;Password=myP#$$w0rd;Option=3;')
# conn = create_mssql_conn() # This one works
conn = create_mysql_conn() # This one breaks
cursor = conn.cursor()
cursor.execute('SELECT * FROM inventory')
while 1:
row = cursor.fetchone()
if not row:
break
print row
Here is the error:
pyodbc.Error: ('IM002', '[IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified (0) (SQLDriverConnect)')
I tried everything from adding Provider=MSDASQL; to changing ANSI to UNICODE in the connection string. Any suggestions?
I was having a similar issue. I am using windows 8, and mysql.
The way I solved the problem was by going into my
control panel>Systems and Security>Administrative Tools.>ODBC Data Sources
Either the 32 bit or 64 bit version depending on your computer.
Then you click on the System DNS file. If you do not see any MySQL driver you have to click ADD. It brings up a list, from that list select the MySQL driver.
For me it was MySQL ODBC 5.3 ANSI(they have a unicode driver also). Click finish. Once you do that then you have to change your connection line in your code to the corresponding Driver that you just filled out.
Ex:
def create_mysql_conn():
return pyodbc.connect(r'Driver={MySQL ODBC 5.3 ANSI Driver};Server=MSSQLSRV;Database=ecomm;Trusted_Connection=yes;')
This should work, or at least it solved my connection issue because I was getting all sorts of different errors with everything I tried. This was what solved the issue for me.
In Win64 there are two ODBC environments: 32 and 64 bit and you can work with Python 32 bit or Python 64 bit. Check what version of Python you use and then use proper version of odbcad32.exe (32 bit version is located in the SysWoW64 directory) to create SystemDSN. With SystemDSN you can check if you can connect to the database. Then try to connect to DB from Python code.
You can list ODBC datasources available to pyodbc via my code recipe: https://code.activestate.com/recipes/578815-printing-list-of-odbc-data-sources-with-pyodbc-mod/
Head to Administrative Tools and the ODBC Data Sources. You should click on the DNS file. Most likely you'd see Microsoft Access and excel as the only data sources available, so you need to add your SQL Server. Mine was SQL Server 2008 R2, and so far, it has worked.
For the error mentioned
"pyodbc.Error: ('IM002', '[IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified (0) (SQLDriverConnect)')"
I installed the 'Microsoft Access Database Engine 2010 Redistributable 64-bit' as I have 64-bit system and then added the DSN in the directory of MS Access database and it's working now.
Here is the link of the video for how to create DSN and connect to python.
https://www.youtube.com/watch?v=zw9P2wSnoIo

Migration of web application backend MS Access 2003 to MS Access 2010

I have an asp application residing on Windows server 2003 -32bit and backend for the application is MS Access 2000. When I upgrade it to MS Access 2010, it throws error: 'Unrecognized Database format'
I even tried to upgrade Access driver on server but of no luck.
What am I missing?
Make sure you have the ACE drivers installed. You said you updated the Access driver on the server but I'm not sure you actually installed the drivers that are needed for the new .accdb format.
By default, Windows only contains drivers for Jet, that allow you to use .mdb Access databases without installing anything new.
On the other hand, the new 2007/2010 Access format '.accdb needs to have the drivers installed separately.
You also need to make sure that your connection string to the database is updated:
string constr = #"Provider=Microsoft.ACE.OLEDB.12.0;Mode=16;Data Source=C:\...\mydb.accdb;user id=;password=;";
In addition to upgrading the database file itself from .mdb to .accdb you'll need to make two changes on the server:
You'll need to download and install the Access Database Engine, available here.
You'll also need to update your connection details for your ASP application. For a DSN-less connection you'll have to update your connection string to one of the formats described here. For example, an OLEDB connection string will have to be updated to Provider=Microsoft.ACE.OLEDB.12.0;.

Mysql table on Excel sheet?

I am using Windows7 and Microsoft office 2010 and mysql5. I want to connect Microsoft excel with my database mysql. I have installed all the drivers. I have created a data source as well. I am going step-by-step to connect, but at the end when i click on test connections, I receive this error message
Test connection failed because of error in intializing provider unspecified error.
You probably are not using the right ODBC driver.
Please check if you downloaded the one that matches your MySQL database. (not only version number, but especially if it is a 32-bit server or a 64-bit server).