OLE DB Provider for ODBC Drivers Error "80004005' - iis

I have to move some customer sites from a very old IIS Server to a newer one, and some sites have troubles to work in the correct way. Most of them complain about a failure called:
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Driver Manager]Data source name not found and no default driver specified.
I've read on the internet that this could depend on missing rights given to the user; other sites states that a Temp folder is missing (I can't imagine that this is right)… There are several other "solutions":
Open the rights for everyone on the server (as someone stated) is not an option for me. Also it is very painful to give explicit rights to every customer (there are several customers which needs the rights).
Do you know an easier solution, a similar way, or an alternative?

That error is nearly always caused by a bad connection string when an ADODB.connection object has its .open() method called.
For example, take the following code:
Dim SqlUsername : SqlUsername = "YOURSQLUSERNAME"
Dim SqlPassword : SqlPassword = "YOURSQLPASSWORD"
Dim ConnectionString : ConnectionString = "DRIVER={SQL Server};SERVER=YOURSERVERNAME;DATABASE=YOURDATABASENAME;UID=" & SqlUsername & ";PWD=" & SqlPassword
Dim db
Set db = Server.CreateObject("ADODB.Connection")
db.Open ConnectionString , SqlUsername , SqlPassword
Note how the connection string includes a driver identifier, in this example that is SQL Server.
Somewhere in your application you'll have an adodb.connection.open() method being called with a connection string, you need to find it, determine the driver being used and install it on your server.
Another thing to keep in mind, some data source drivers are 32bit and if your running your website in a 64bit application pool in IIS you'll need to allow 32bit objects - see this related question on that: Uploading picture after migration from IIS 6.0 to IIS 7.5

I have got the similar issue while working with classic asp and with IBM DB2 ODBC Driver. I do have two websites configured in my local IIS 7.5, Connection.Open is working fine with default web site whereas it does not with the second website, after several configuration changes as per my knowledge and as per sugesions from stackoverflow did not helped me in this case.
What worked for me is to enable (Set to True) the 32bit applications Advanced setting of ASP.NET V4.0 Classic Application Pool.
Application Pools-->ASP.NET V4.0 Classic-->
Advanced Settings--> under General Options double click Enable 32-bit Applications to set to True.
This small configuration may help some one who has the same issue.

Your old server has some ODBC DSN (Data Source Names) defined, and this is how your applications are connecting to the databases. You need to define these on your new server. Look in your server's Control Panel.

For sure now you have solved your problem but nevertheless for knowledge purposes here is what can work:
On top of what #webaware said please follow the steps below on your new server machine:
Go to Control Panel
Administrative Tools
Data Sources (ODBC)
Click System DSN tab
Click the Add button
Look for and select the Oracle in Client driver.
Now type in the Data Source Name, Description, TNS Service Name and User ID
Note: Ask your database administrator for the correct TNS Service name and User ID. You will also need the user id for testing your connection.
Click the Test Connection button
Type in your TNS Service name as the Service Name, User ID as the User Name and the password of the User ID
Click the Ok button
Your connection should be successful now.

I had the same problem after update Control Panel Plesk 12.5 to Plesk Onyx 17.5.3 and see updated ODBC Driver to 5.3.
To resolve the problem I changed ( 5.1 ) to ( 5.3 Unicode Driver ) in connection string.
Change this :
Conn.Open "DRIVER={MySQL ODBC 5.1 };SERVER=localhost; DATABASE=psa; UID=admin;PASSWORD=mypassword;Port=8306; OPTION=3"
To :
Conn.Open "DRIVER={MySQL ODBC **5.3 Unicode Driver**};SERVER=localhost; DATABASE=psa; UID=admin;PASSWORD=mypassword;Port=8306; OPTION=3"

Be sure to place the connection code at the top of the page vs bottom. That fixed my issue with this error.

The driver is not found because these drivers are not configured or registered in the system, I too got such an error when I run a asp page website in localhost. The same page was running smoothly in the host server.
To register, go to Microsoft ODBC Administrator -> SYSTEM DSN tab -> Add your driver by clicking 'configure' button. Hope this helps.

For me it was just a missing ";" after database name in connection string

This was not related to permissions. You are may be you defining database connections that explicit referenced a specific version of the mysql ODBC driver.
You will have to Update your connection strings.

i have same error when use asp classic script , MySQL and Plesk control Panel (windows)
You can Enable 32-bit applications in Plesk :
Go To Plesk Control Panel => Hosting & DNS => Dedicated IIS Application Pool for Website => Enable 32-bit applications

Related

Connect Mac Excel 2016 to local MAMP SQL database

As per the title I'm trying to connect to local MAMP database. This should be possible as Excel Mac 2016 includes Simba ODBC driver. However when I try and set up a connection via the dialog box shown, I always get an error shown below.
I've use the standard MAMP settings for the sql server as shown in first image.
Any help would be much appreciated as is hard to make this work.
Thanks
MAMP settings
Excel Dialog box
Error message
I've finally got this connecting.
Info which solved the answer found at
https://github.com/openlink/iODBC/issues/29
Basically excel 365 is sandboxed and so even if you create a DSN that tests ok in iODBC, it just continues to crash excel if you try to connect to it. Also I'm guessing sandboxing explains why excel is not able to see User DSNs created with iODBC, and can only see system ones.
So for others trying to connect Excel to MySQL, I needed to download iODBC to set up DSNs, and then download the iODBC connector for the ODBC drivers.
https://dev.mysql.com/downloads/connector/odbc/
I then moved the driver libraries from /usr/local/mysql..... to /Library/ODBC/mysql...
I created a system DSN (as excel seems only to see the system ones) with keys
server 127.0.0.1
port 3306
username root
password *
[These details came from the MAMP page]
And then I was able to connect!

Connecting to an OBDC database from a Xamarin IOS / Visual Studio Mac solution

First, I am just getting starting with VS/Mac and Xamarin in general.
This question concerns accessing database servers.
I am attempting to port existing corporate applications to the iOS environment. At the outset of a "Hello World" type app in order to get used to the environment I successfully added a reference to "System.Data". This lead me to easily exposing SQL Server connection options via "System.Data.SQLClient" . No problem so far.
Another requirement of our corporate apps is to connect to a Progress database and the previous method was to utilize a reference to "System.Data.odbc". This is my issue. "System.Data.odbc" does not exist in this environment.
I can switch to a web service if necessary, but I would like to port as much of the original code as possible to start with.
Also, these are closed applications in the sense that they are only available on our corporate network.
In a Windows Forms application i would create a connection similar to this:
odbcConnection cn = new ODBC.connection;
cn.connectionString = blah blah;
cn.open();
And so on...
To those that have developed corporate data access apps in both Windows Forms and Visual Studio/Mac/Xamarin I simply ask: "What am I missing?"
Thanks to each responder in advance.
Earl

Trouble connecting to Sage 50 with Excel via ODBC

I'm trying to get into Sage 50 (v20 2014) via ODBC in Excel 2016 64bit. I keep running into connection problems.
I've set up a 64bit DSN using the utility on the Sage disk and I get the following...
If I go through 'Data/From other sources/From Microsoft Query' I get the usual 'Choose data source' box and the Sage DSN is visible. If I click it and click ok MS Query launches and then crashes immediately and I get 'Microsoft Query has stopped working'.
Interestingly, if I go back to the 'Choose Data Source' box, I get the error 'One or more of the folders in the search path could not be accessed'.
The default path set in the DSN is to 'C:\ProgramData\Sage\Accounts\2014\Company.000\ACCDATA' - the actual Sage database that I'm trying to access is in a network folder - 'V:\SHARED\Sage\COMPANY.002\ACCDATA'. I've tried both paths in the DSN and get the same results.
If I go through 'Data/New Query/From Other Sources/From ODBC' and then choose the Sage DSN, I get a full list of the tables but when I click on one of them to generate a preview, I get the following error...
DataSource.Error:ODBC:ERROR[42S02] Table not found
Details:
DataSourceKind=Odbc
DataSourcePath=dsn=SageLine50v20
OdbcErrors=Table
Also, if I use 'From data Connection Wizard', Excel crashes as soon as I choose the Sage DSN.
I'm not using any kind of connection string so I don't think it's authenticating with a user - I'm wondering if that would make a difference and if so, what would the connection string be?
I've been through everything that comes up if I google the problem and I've set up logins correctly etc but it will not connect. I don't know if this might be a 32/64bit comparability issue, but I'm using the 64bit Sage driver from the disk so I assumed that it wouldn't be a problem.
I've also tried connecting with MS PowerBI but I get the same problems.
Sage 50 is temperamental in how it allow connections to their database, what I mean: When it don't change the port, it just reject connections in awkward ways or not connect at all.
I didn't find a solution. However I found this workaround: Open sage, login and close it then connect using the DSN sage created with the sysadmin account(It grants you full access).
When defining the data path, it is critical to include a final backslash e.g
C:\ProgramData\Sage\Accounts\2018\COMPANY.001\ACCDATA\

connecting oracle database with MS Excel

I am creating connection of excel spread sheets with my oracle database. But, tnsnames.ora cannot read in ODBC data sources. I have already created an environmental variable of tnsnames.ora but still its not working.
path: C:\OraCient12c\Administrator\product\12.1.0\client_1\Network\Admin
I am using Windows Server 2012R2.
Below image showing the problem.
Get the Oracle client connection working independently of ODBC before you go further.
Go to the command/DOS prompt and then use TNSPING database-name to check that the Windows client can make a connection to Oracle (database-name is whatever the Oracle database you're working with is called).
If TNSPING can't run at all, you need to install Oracle client.
If TNSPING runs but can't locate/ping your database, proceed to set up TNSNAMES.ora until you get it to see the database.
To point to the correct location for your own TNSNAMES.ora, use the Windows environment variable TNS_ADMIN (http://www.dba-oracle.com/t_windows_TNS_ADMIN_environment_variable.htm).
Set up the content of TNSNAMES.ora with the network locations of whatever particular databases you want to work with.
Once your Oracle client configuration is correct, then you can proceed to set up ODBC data source. Put your database name as the TNS service name, and an Oracle user in the User ID field. Hopefully it will connect using the ODBC layer.

Cannot connect to FoxPro Database from IIS 7.5

I am currently having serious issues connecting to a FoxPro database using an ODBC connection from IIS7.5
The database is on another machine than the IIS server and is accessed via a fileshare.
When I call the webpage from IE on the IIS server everything works fine. When I call the webpage from another machine I get a '[Microsoft][ODBC Visual FoxPro Driver]Cannot open file' error.
The application pool runs as a domain user.
When I run ProcMon on the IIS Server and call the page, when it is called from the IIS Server it accesses the offending file and then a whole bunch of other FoxPro files for that database.
When I run the page from another machine, I get an ACCESS DENIED error when it tries to access the first file.
It is a CreateFile call for a file called Comp_W.DBC that fails.
I checked and it is the same user that is invoking these calls to the fileshare so it is not differing credentials that is causing the problem. I even went as far as making the app pool account a domain admin to see if that might sort out the issue but still the same problem.
I cannot move the database onto the same server as IIS. I have tried to run the web application on the same server as the FoxPro database but I hit different issues to do with the fact that OWA runs on that server, and the 32bit ODBC driver causes conflict with an OWA dll that is loaded as a global module. I really need it to run IIS on a separate server from the FoxPro database.
The server(s) do not seem to be running kerberos as the delegation tab is not present when you administer users.
Any help would be greatly appreciated.
James :-)
I'd use the Visual FoxPro OLE DB driver instead of ODBC, because it's newer, faster and won't conflict with OWA. That would let you move it onto the IIS server.
Past experience suggests that you haven't given the IIS user permission to access the folder where the DBFs live. When you run IE on the local machine, you're passing the credentials right through -- when you run it on another machine, I believe the anonymous user rules come into play. (Been a while since I had to debug this one, take it with a grain of salt.)

Resources