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?
asked Jan 11, 2013 at 14:47
John BrunnerJohn Brunner
2,84211 gold badges44 silver badges84 bronze badges
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.
slawekwin
6,2701 gold badge43 silver badges57 bronze badges
answered Jul 26, 2016 at 5:53
1
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
answered Jan 11, 2013 at 16:32
HeavenCoreHeavenCore
7,5136 gold badges46 silver badges61 bronze badges
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.
answered Jan 11, 2013 at 22:32
webawarewebaware
2,7952 gold badges29 silver badges37 bronze badges
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.
answered May 24, 2017 at 12:04
21stking21stking
1,18111 silver badges19 bronze badges
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"
answered Apr 19, 2018 at 18:03
Be sure to place the connection code at the top of the page vs bottom. That fixed my issue with this error.
answered Apr 22, 2019 at 4:18
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.
answered Jan 25, 2017 at 5:19
Khushi4.netKhushi4.net
3291 silver badge15 bronze badges
For me it was just a missing «;» after database name in connection string
answered Apr 13, 2017 at 14:46
0
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.
answered Oct 27, 2020 at 2:06
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
answered Jul 2, 2022 at 13:58
An effortless way to create dynamic website application involves Open Database Connectivity aka ODBC.
However, web apps can fail due to errors with ODBC database connection. And, they report ODBC error 80004005.
Finding the real reason behind the ODBC error can be tricky. That’s why, we regularly receive requests to fix odbc errors as part of our Server Management Services.
In this write-up, we’ll analyze the top 5 reasons for ODBC error 80004005 and how our Database experts fix it.
How does error 80004005 look like?
A vast majority of websites in internet use database as its back-end. These websites store the user details and related data in the databases. And, to make these details display on the website, we commonly use ODBC method.
Fortunately, this ODBC method is independent of website coding language. That is, it doesn’t matter whether your website uses PHP or ASP code.
It is the ODBC database drivers that hold the underlying database details and helps to connect to the database systems. And, if for some reason this database connection fails, it results in ODBC error 80004005. For example, a typical error page looks like:
In general, such ODBC errors show up with websites using Microsoft Access databases. These ASP websites generate these errors when having trouble accessing the database file. Again, these 80004005 errors occur in OLE DB Provider for ODBC or Microsoft Jet Database Engine too.
What causes ODBC error 80004005 ?
Now, its time to check on the causes for error 80004005. From our experience in managing websites, our Dedicated Engineers often encounter this message in various scenario.
1. Incorrect permissions
Basically, Windows websites should have access rights on the database files with extension .mdb, .ldb, etc.. If any of the read or write permissions are missing, website will show error 80004005. Essentially, the website user Need MODIFY permissions on the entire database directory. This allows the process to create a lock file (ldb) in the same directory as the mdb file.
The same error can happen if the website database .mdb file has a READ ONLY attribute set.
IIS7 supports classic ASP. But, for using ASP with an MS Access mdb database, it requires special settings. Often, the path to the database files create a problem here too.
2. Wrong DSN settings
Another common reason for ODBC errors attributes to Data Space Name aka DSN settings. In general, DSN holds the information of website specific database that ODBC driver connects to. Any wrong details will cause problems with ODBC connection.
At times, customers forget to create DSN, or add wrong path to the database file. Again, in servers with control panels, often DSN creation may not create necessary files on the server. This also create ODBC errors.
3. Corrupt database
Obviously, a corrupt database will always result in an error. And, in such cases, search query will not yield correct results and show up ODBC error 80004005.
4. Already running process
Microsoft access databases have trouble in handling multiple processes at a time. When a process still has a file handle open to the db, it can show ODBC connection error. This typically happens when users do not close the connection properly. For example, a partial upload of database file via FTP client can leave behind an open connection.
5. SQL server restrictions
Last and not the least, SQL server security restriction can also be a reason for ODBC error 80004005. When SQL Enterprise Manager has Integrated security turned on, the windows account should be mapped to the database account. Else, it will result in website errors.
How we fix ODBC error 80004005
Now that we know the typical reasons for the error 80004005, let’s check on how our Database Engineers resolve ODBC errors for our customers.
Recently, we received a request from customer where his website was not loading. He had trouble in making connection to the website’s database. The website showed the below error message:
Microsoft OLE DB Provider for ODBC Drivers error '80004005' [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified /LM/W3SVC/144/ROOT/global.asa, line 18
As the fist step, we verified the permissions and ownership of the database files. The IUSR account had proper permissions on the files. Additionally, ODBC driver did exist on the server too.
Then, we checked the DSN connection string. And, we found that the database connection string in his .asa file was set up incorrectly. Therefore, we corrected the settings and that fixed the website error.
Similarly, in cases where ODBC errors show up due to open connections, our Dedicated Engineers recycle the website’s application pool which will close any connections from the site. We also educate customers to log off or close any FTP clients after accessing the database file.
Generally, to troubleshoot DSN related errors, we always test the website code with a DSN-less connection. That easily helps to eliminate DSN errors.
And, in the worst event of database corruption, all we do is database restore from backup.
For security reasons, we always recommend customers to place the database files inside a directory in the private folder. For example, in IIS Windows servers with Plesk panel it can be (ftproot)/private/database.
[Do you get troublesome ODBC error on your websites? Our Database Experts can fix it in a jiffy.]
Conclusion
In a nutshell, ODBC error 80004005 can happen due to incorrect permission on database files, wrong connection string, corrupt database and many more. Today, we saw the top 5 reasons for the error and how our Support Engineers fix it.
PREVENT YOUR SERVER FROM CRASHING!
Never again lose customers to poor server speed! Let us help you.
Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.
GET STARTED
var google_conversion_label = «owonCMyG5nEQ0aD71QM»;
- Remove From My Forums
-
Question
-
I am getting the following error when trying to update a table in an access db using vb script:
Microsoft OLE DB Provider for ODBC Drivers
error ‘80004005’
[Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable query.
The code is:
Set Connection = Server.CreateObject(«ADODB.Connection»)
Connection.Open «DSN=timesheet_test;»
SQLStmt = «UPDATE DISTINCTROW [tblTotalHrs] «
SQLStmt = SQLStmt & «SET emplappr='» & emplappr & «‘,reghrs='» & wreghrs & «‘,pto='» & wpto & «‘,std='» & wstd & «‘,brvhrs='» & wbrv & «‘,totworked='» & wtotwork & «‘,ovthrs='» & wovthrs &
«‘,weekhrs1='» & wwk1 & «‘,weekhrs2='» & wwk2 & «‘,sprvappr='» & suppappr & «‘,brvcomm='» & brvcomm & «‘,borhrs='» & borhrs & «‘ «
SQLStmt = SQLStmt & «WHERE empid='» & empid & «‘ AND ppd_end=#» & ppdend & «# «
Set RS1 = Connection.Execute(SQLStmt,RowsUpdated)The db is accessed thru an odbc connection. This was working fine until we converted the original db to Access 2007 and created a odbc connection for the new db. Is there something in that setup that could be set as Read Only?
Thanks.
P.S. Wasn’t sure exactly which category to put this under. If it’s not the right one can someone put it to the proper one? Thanks.
Answers
-
Figured it out. The security need to be modified on IIS. that fixed the issue.
Thanks for the info on the Conenction.mode =3. I will keep it in mind for future reference.
-
Marked as answer by
Tuesday, September 27, 2011 12:54 PM
-
Marked as answer by
Microsoft OLE DB provider for ODBC driver error 80004005, A simple technique to make active site application incorporates Open Database Connectivity also called ODBC (Old Database Connectivity).
Regardless, web applications can mine due to errors with the ODBC database connection. Additionally, they report ODBC error 80004005. Finding the real clarification for the ODBC slip-up can be unsafe. That is the explanation, we reliably get sales to fix odbc errors as a component of our Server Management Services.
In this survey, we’ll analyze the best 5 clarifications behind ODBC error 80004005 and how our Database experts fix it.
How does error 80004005 take after?
A larger piece of purpose in the web uses the informational index as its back-end. These locales store the customer shades and related data in the informational collections. In addition, to make these shades show on the site, we commonly use the ODBC technique.
Microsoft OLE DB provider for ODBC driver error 80004005, Fortunately, this ODBC system is open-minded from site coding language. That is, it doesn’t have any effect whether your site uses PHP or ASP code.
Overall, such ODBC errors show up with destinations using Microsoft Access databases. These ASP destinations produce these bumbles while encountering trouble getting to the database archive. Again, these 80004005 mix-ups occur in OLE DB Provider for ODBC or Microsoft Jet Database Engine also.
What causes ODBC error 80004005?
It’s a chance to mind the purposes behind bumble 80004005. Microsoft OLE DB provider for ODBC driver error 80004005, From our inclusion with directing destinations, our Dedicated Engineers routinely experience this message in various circumstances.
Mixed up approvals
Basically, Windows destinations should move toward rights on the database archives with an increase .mdb, .ldb, etc in the unlikely event that any of the scrutinize or create approvals are missing, the site will show error 80004005. Essentially, the site customer Need MODIFY approvals all in all informational index list. Microsoft OLE DB provider for ODBC driver error 80004005, This allows the association to make a locked archive (ldb) in a comparable list as the MDB record.
A comparative misstep can happen if the site informational index .mdb archive has a READ ONLY quality set. IIS7 maintains a commendable ASP. In any case, using ASP with an MS Access MDB informational index requires excellent settings. Consistently, the way to the database records makes an issue here also.
Wrong DSN settings
Another ordinary defense ODBC errors credits to Data Space Name otherwise called DSN settings. When in doubt, DSN holds the information of the site clear database that ODBC driver interfaces with. Any misguided nuances will cause issues with the ODBC connection.
Microsoft OLE DB provider for ODBC driver error 80004005, Every so often, customers disregard to make DSN or add an incorrect way to the informational index archive. Again, in specialists with control sheets, often DSN creation may not make fundamental reports on the laborer. This also makes ODBC errors.
Degenerate informational collection
Microsoft OLE DB provider for ODBC driver error 80004005, Unmistakably, an awful informational collection will reliably achieve an error. Likewise, in such cases, the search question will not yield the right results and show up ODBC error 80004005.
Already running collaboration
Microsoft Access databases have a burden in dealing with various cycles at the same time. Exactly when a connection really has a record handle open to the DB. it can show an ODBC connection error. This consistently happens when customers don’t close the connection appropriately. Microsoft OLE DB provider for ODBC driver error 80004005, For example, a deficient exchange of database records through an FTP client can leave behind an open connection.
SQL laborer impediments
Last and not least, SQL worker security weakness can similarly be a defense ODBC error 80004005. Microsoft OLE DB provider for ODBC driver error 80004005, Exactly when SQL Enterprise Manager Has Integrated security turned on, the windows record should be wanted to the informational collection record. Else, it will achieve site errors.
How do we fix ODBC error 80004005?
we know the normal purposes behind the error 80004005, Microsoft OLE DB provider for ODBC driver error 80004005, what about we watch out for how our Database Engineers settle ODBC errors for our customers.
Lately, we got a request from a customer where his site was not loading. He had to bother in making a relationship with the site’s informational collection. The site showed the under screw up message:
Microsoft OLE DB Provider for ODBC Drivers screw up '80004005' [Microsoft][ODBC Driver Manager] Data source name not found and no not set in stone/LM/W3SVC/144/ROOT/global.asa, line 18
As the hold hand step, we checked the assents and requirements regarding informational collection records. The IUSR account had correct approvals on the records. Likewise, ODBC driver existed on the specialist too.
Then, we checked the DSN connection string. Likewise, we found that the database connection string in his. the record was set up erroneously. Thusly, we helped the settings, and that good the site screw up.
Dedicated Engineering recycle the website’s application
Likewise, in circumstances where ODBC errors seem due to open connections, our Dedicated Engineers reuse the site’s application pool which will close any relationship from the site. We moreover teach customers to log off or close any FTP clients resulting in getting to the database record.
All things considered, to examine DSN-related slip-ups, we for the most part test the site code with a DSN-less connection. That effectively helps with clearing out DSN errors.
Also, in the most really terrible event of informational collection corruption, all that we do is informational collection restore from support.
For security reasons, we, by and large, recommend customers put the database records inside a file in the private coordinator. For example, in IIS Windows workers with Plesk board, it might be (FTP root)/private/database.
Conclusion
Fundamentally, ODBC error 80004005 can happen on account of mistaken approval on informational index reports, wrong connection string, degenerate informational index, and some more. Today, we saw the fundamental 5 purposes behind the error and how our Support Engineers fix it.
Johnny |
|
1 |
|
04.06.2007, 19:30. Показов 4453. Ответов 17
Многоуважаемый ALL! При попытке подключения к базе данных происходит такая ошибка: Microsoft OLE DB Provider for ODBC Drivers error ‘80004005’ [Microsoft][ODBC Microsoft Access Driver] Disk or network error. /www/tutor2/asptoc.asp, line 18 При этом скрипт выглядит так: <% oConn.Open strConn В 18 строке — попытка открыть базу… База объявлена в системе и как File DSN и как System DSN. NTFS-разрешениями все разрешено… Может кто подскажет в чем может быть причина?.. Был бы очень благодарен! |
0 / 0 / 0 Регистрация: 21.04.2007 Сообщений: 156 |
|
04.06.2007, 19:54 |
2 |
фиг знает, влом думать, я пьян! %) если она в DSN прописана, то пиши лутше так: Вот это будет воркать!!!
0 |
favn |
|
04.06.2007, 21:27 |
3 |
Строка соединения использует старый синтаксис, он уже почти не используется. Желательно так-же проверить, что же выводит Server.MapPath(‘scout.mdb’). И совпадает ли это с реальнум путем к базе. |
Johnny |
|
04.06.2007, 21:54 |
4 |
Большое спсб, favn! Это наталкивает на мысль… Но к сожалению, подобными выражениями я не пользовался, поэтому к чему его приставить не соображу. Вставляю как есть (для Access97) — начинает ругаться буквально на все…. Не могли бы Вы привести эти строки в составе скрипта? Спасибо! |
Johnny |
|
04.06.2007, 21:56 |
5 |
И Вам спасибо, уважаемый Newton Arroyo! Попробовал, как посоветовали: поставил пароль на базу, подключение выполнял по имени и все такое. Но все равно не заворкало… Thanks anyway! |
0 / 2 / 3 Регистрация: 27.03.2012 |
|
04.06.2007, 21:57 |
6 |
Ну, например, Set Con=Server.CreateObject(‘ADODB.Connection’)
0 |
Johnny |
|
04.06.2007, 22:06 |
7 |
На эту запись (с соответствующим путем, конечно) Set Con=Server.CreateObject(‘ADODB.Connection’) Выдает такую ошибку (первый раз вижу…): Microsoft JET Database Engine error ‘80004005’ Unspecified error /www/tutor2/asptoc.asp, line 16 Что ж он еще от меня хочет? |
0 / 2 / 3 Регистрация: 27.03.2012 |
|
04.06.2007, 22:18 |
8 |
Ты вообще где его пытаешься запустить? ОС, версии и т.д…
0 |
Johnny |
|
04.06.2007, 22:27 |
9 |
Платформа: WinNT 4.0 Server + SP6a |
Sergik |
|
05.06.2007, 10:49 |
10 |
Мысли, что в голову приходят: |
favn |
|
05.06.2007, 12:51 |
11 |
О ошибке 80004005: |
Johnny |
|
05.06.2007, 16:18 |
12 |
Dear Sergik! Спсб за мысли. Они дают такие результаты: 1) вывести Server.MapPath(‘scout.mdb’), точный ли он путь к БД показывает? (если пользоваться первым путем, хотя не советую) Путь абсолютно точный! Пробовал даже использовать просто напрямую записанный без переменной путь — тоже самое… 2) проверить право на чтение пользователю IUSR_<computer_name> на файл .mdb Право на чтение есть. Пробовал ставить даже Full Control — тот же эффект. 3) убрать файл DSN и оставить тока system DSN Эффект тот же… 4) открывать connection так: Пробовал, не получается… Вообщем все хреново… |
Johnny |
|
05.06.2007, 16:30 |
13 |
Уважаемый favn! Я уже читал эту статью ранее, однако, к сожалению, она не описывает ни одну ни вторую ошибку… Просто навождение какое-то… |
Sergik |
|
05.06.2007, 17:36 |
14 |
Еще пару мыслей: |
favn |
|
06.06.2007, 12:51 |
15 |
Ну что-же… Может переставить MDAC??? |
0 / 0 / 0 Регистрация: 03.09.2009 Сообщений: 37 |
|
03.09.2009, 09:24 |
16 |
Та же самая проблема у меня. Поставил MDAC 2.7 и jet 7 — не помогло.
0 |
Sergik |
|
03.09.2009, 10:40 |
17 |
еще одна фишка есть, точнее две: |
0 / 0 / 0 Регистрация: 03.09.2009 Сообщений: 37 |
|
03.09.2009, 10:48 |
18 |
Сейчас уже неактуально(Помогла переустановка винды), но Код connection.Open('DSN=dm'); доступ к mdb у IUSRа ессно был. Проблема именно в связи ASP<>Jet OLEDB.
0 |