ADODB.Command error 800a0e7a - iis

After running Windows Updates, my computer crashed resulting in repair of corrupted system files (not by me). Testing websites via localhost, my classic ASP/VBScript pages produced this error. After going through many similar articles for a week, I'm at a loss.
Running 64-bit Windows 7; Dreamweaver CS3 (32-bit); 32-bit ODBC and IIS 7.Websites using classic ASP/VBScript with MS Access 2007 (Jet 4.0) and MySQL via ODBC connector.
Error when accessing System DSNs in ODBC thru DW only (no error via SysWOW64):You are logged on with non-Administrative privileges. System DSNs could not be created or modified.
Other ODBC errors:Driver's ConfigDSN, ConfigDriver, or ConfigTranslator could not write to the registry;andConnection Failed [MySQL] [ODBC 5.3(w) driver] Can't connection to MySQL server on 'localhost' (10061)
Notes:
All 32-bit ODBC user DSNs and drivers are listed.
IIS settings:--Enable 32-bit Application: True--Enable Parent Paths: True--Managed Pipeline Mode: Classic
Permissions and full control set in IIS (default and specific websites), and folders and databases (including inetpub and WAMP), for all groups and users (except CREATOR OWNER).

Related

How to connect Excel to Oracle with PowerQuery

I am trying to connect Excel to my company's Oracle Database. According to the following instructions it should be fairly easy: https://www.wikihow.com/Connect-Excel-to-an-Oracle-Database.
However it has been impossible and quite frustrating so far.
I have followed two different approaches that I've found online.
FIRST APPROACH: installed ODAC from Oracle's Universal Installer
I went to this site https://www.oracle.com/database/technologies/dotnet-odacdev-downloads.html and downloaded the ODAC 12.2.0.1.1 file.
Then, I went through the installation process basically just clicking 'next' on every step.
Note 1: (I don't know if this might be important), in the Database Connection configuration tab I did not fill in any of the information (simply because I didn't know what to put there). It said that if information wasn't filled in, it would not create the TNSNAMES.ORA file.
Note 2: After finishing the installation it says 'run the SQL scripts located in the ... directory after the install'. Which I didn't do, again, because I didn't know how.
After the installation finished a directory was created in the following location: C:\app\client\myUserName\.
The directory goes all the way down to C:\app\client\myUserName\product\12.2.0\client_1, and it contains a bunch of files and folders.
I noticed that no environmental variable was created.
SECOND APPROACH: installed ODBC instant client
I went to this site https://www.oracle.com/database/technologies/instant-client/winx64-64-downloads.html and downloaded both instantclient-basic-windows.x64-19.6.0.0.0dbru.zip and instantclient-odbc-windows.x64-19.6.0.0.0dbru.zip.
Then I created the directory C:\Oracle\instantclient_19_6 and unziped both folders contents into it.
Finally, I ran odbc_install from the command_line, as an administrator, but got Oracle ODBC Driver with same name already exists.
Note: in this case I also noticed that no environmental variable was created.
RESULTS:
When I go to Excel and click on Data\From Database\From Oracle Database I keep getting the same error as before: The recommended provider ('Oracle.DataAccess.Client') is not installed. You can continue with your current provider, however it has been deprecated and may not work properly.".
I was able to solve it by installing the 64 bits version of Oracle's client. Its located at https://www.oracle.com/database/technologies/112010-win64soft.html, file win64_11gR2_client.zip.
Although the message "The recommended provider ('Oracle.DataAccess.Client') is not installed. You can continue with your current provider, however it has been deprecated and may not work properly." remained, I was able to connect after ignoring it.
I have also tried a bunch of approaches and finally got rid of the 'Oracle.DataAccess.Client is not installed' error.
Install Oracle Client for Microsoft Tools:
ODP.NET, Oracle Developer Tools for Visual Studio (Code), and ODAC
https://www.oracle.com/database/technologies/net-downloads.html
Oracle Client for Microsoft Tools installs and configures ODP.NET to support 64-bit Microsoft tool connections with Oracle database. It supports connecting with Power BI Desktop, Power BI service, Excel, SQL Server Analysis Services, SQL Server Data Tools, SQL Server Integration Services, SQL Server Reporting Services, and BizTalk Server.
I have installed Oracle Client for Microsoft Tools 19.17 for (Microsoft Windows x64 (64-bit)) (V1032890-01.exe).
Alternatively, you could follow the learn more link:
Connect Microsoft Tools to Oracle Databases
https://www.oracle.com/database/technologies/appdev/ocmt.html
Tutorials > Power BI Desktop: Connect to Oracle Database
https://www.oracle.com/a/ocom/docs/database/microsoft-powerbi-connection-adw.pdf

Application run from network share on Windows 10 cannot connect to SQL Server

Windows 10 Build 17134 (April 2018) has started to affect users.
Software:
is run from a network share (e.g. \\hydrogen\Contoso\Grobber.exe)
connects to SQL Server database
using OLEDB
It fails with the error:
[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied
If the software is run from the local PC it works fine.
Using ADO
I've tried using ADO COM objects:
String connectionString = "Provider=sqloledb;Data Source=screwdriver;Integrated Security=SSPI;";
Connection cn = CreateComObject("ADODB.Connection") AS Connection;
cn.Open(ConnectionString, "", "", 0);
[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied
Using OLE DB
As nobody knows, ADO is a friendly wrapper around the over-engineered OLE DB API:
String connectionString = "Provider=sqloledb;Data Source=screwdriver;Integrated Security=SSPI;";
IDataInitialize dataInit = CreateComObject(CLSID_MSDAInitialize) as IDataInitialize;
IDBInitialize provider;
dataInit.GetDataSource(nil, CLSCTX_INPROC_SERVER, ConnectionString, IDBInitializeSC, out provider);
provider.Initialize; //Actually opens the connection to the database
[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied
And using Delphi XE6's wrapper of ADOdb
Since i use Delphi, i thought it would be useless to include a CMRE using Delphi's own object wrappers around ADODB:
program W10OleDbTest;
{$APPTYPE CONSOLE}
{$R *.res}
uses
System.SysUtils,
ComObj,
ADOdb,
ADOInt,
ActiveX,
WinApi.OleDb;
var
cs: string;
conn: TADOConnection;
begin
conn := TADOConnection.Create(nil);
conn.ConnectionString := 'Provider=sqloledb;Data Source=screwdriver;Integrated Security=SSPI;';
WriteLn('Opening connection to database using TADOConnection...');
try
conn.Open;
WriteLn('Successfully connected to database using TADOConnection');
except
on E:Exception do
WriteLn('Exception connecting to database using TADOConnection: '+E.Message);
end;
Writeln('Press enter to close.');
ReadLn;
end.
What is Windows 10 doing that it's breaking application - and how do i tell it to stop it?
Client PC: Windows 10 Build 17134
SQL Server: SQL Server 2005
Network share: Windows Server 2003 R2
Looking at the release notes from Build 17134, there are no changes related to anything like this; so i assume it is a bug.
Bonus Chatter
digitally signing the executable makes no difference
specifying SQL Server by IP address (rather than name) makes no difference
running the application as an administrator makes no difference
turning off Domain, Public and Private firewall makes no difference
turning off Windows Defender makes no difference
turning off Windows Defender Real-time protection makes no difference
SMB version 1
It seems to be an unintended security feature (i.e. one that i cannot disable) that prevents applications from opening network connections if they were launched from an SMB 1 (verses SMB 2, or SMB 3) share:
| SMB Version | Result | Example of product |
|-------------|-----------|------------------------|
| 1.5 | Fails | Windows 2000 |
| 1.5 | Fails | Synology NAS |
| 2.0 | Works | Windows Server 2008 |
| 2.1 | Works | Windows Server 2008 R2 |
Obviously it's no good that a correctly written application fails after an update to Windows.
You can get the SMB version in use by running from a Powerhell command prompt:
> Get-SmbConnection
ServerName ShareName UserName Credential Dialect NumOpens
---------- --------- -------- ---------- ------- --------
screwdriver Fizbang SOVERFLOW\ian SOVERFLOW\ian 2.0.2 6
hydrogen Contoso SOVERFLOW\ian SOVERFLOW\ian 1.5 6
Bonus Reading
https://changewindows.org/build/redstone4/17134/pc🕗
Windows 10 Version 1803 Update Breaks Some Applications (🕗)
KB4284835: June 12, 2018—KB4284835 (OS Build 17134.112) (🕗)
Windows 10 Fall Creators Update and Synology NAS (🕗)
KB4034314: SMBv1 is not installed by default in Windows 10 Fall Creators Update and Windows Server, version 1709 and later versions (🕗)
Windows 10 1803 can’t run EXE files from a network shared folders (🕗)
[RS4:1803]Windows 10 1803 won't run ODBC SQL connected application from network (🕗)
It is an issue with Windows Defender, and a fix is expected for later in June (2018).
If an application is run from an SMBv1 share, with Windows Defender installed, the application will not be allowed to open socket connections.
Microsoft has acknowledged this a a "hot issue":
Symptom: Some users running Windows 10 version 1803 may receive an error "An invalid argument was supplied" when accessing files or running programs from a shared folder using the SMBv1 protocol.
Workaround: Enable SMBv2 or SMBv3 on both the SMB server and the SMB client, as described in KB2696547.
Microsoft is working on a resolution that will be available later in June.
You can also workaround the issue by installing a different anti-virus product. If you install another anti-virus product, Windows Defender will disable itself, and you can run your applications.
Note: Disabling Windows Defender will not be sufficient, as it doesn't actually disable Windows Defender. You have to install another AV before Windows Defender will actually disable itself.
Edit 6/28/2018 - Fixed
Microsoft has released a fix in OS Build 17134.137:
June 26, 2018—KB4284848 (OS Build 17134.137) (archive)
Addresses an issue where some users may receive an error when accessing files or running programs from a shared folder using the SMBv1 protocol. The error is "An invalid argument was supplied".
Installed KB4284848, rebooted, and confirmed it fixes it.

Provider cannot be found ADODB error while connecting to Excel 2016 or CSV from Internet Explorer

Background: In our organization, there is a html tool which runs in the Browser(IE11). The tool has a couple of stages and data from each stage is stored in a SharePoint list. In the final stage, all this data needs to be reconciled from a data set which comes from banks in a spreadsheet. Here the tool uses ADODB connection to connect to the Excel file, read the data from it and match with the data on SharePoint.
Problem: Recently after a windows 10 upgrade, the tool stopped exactly on the connection line throwing an error - "Provider cannot be found. It may not be installed correctly". I also got the Microsoft access Database engine re-installed from IT but to no good(this was after reading about answers to my query online)
I am the developer of this tool and it works just fine on my laptop. Below are the specifications of the connection string and other details of software installed
Windows Version: 1511(OS Build 10586. 1176) Windows 10 64 bit
IE: 11
IE version: 11.1176.10586.0
IE Update Version: KB4040685
Office: 2016
Connecting to Excel(version) - 2007-2010 (xls, xlsx format)
Connection Object: ADODB.Connection (via ActiveXObject in JavaScript )
Connection String Parameters
•Provider - Microsoft.ACE.OLEDB.12
•Extended Properties - Excel 8.0 (Also tried Excel 12.0 xml)
•HDR - Yes
•IMEX = 1
OLEDB Drivers installed on the machine: Microsoft ACE 12.0, 16.0 and Jet 4.0
This is the exact same configuration on my laptop and the tool is easily able to connect to Excel or Access also for that purpose.
I have also tried the below, nothing was a success
1.Used Jet.4.0 in the connection string - Here I got error "External table is not in the expected format" & "Unexpected error from database"
2.Tried using ODBC drivers with error - "Data source name not found and no drivers installed"
3.Opened the tool in 32 bit environment
4.Made a HTA app and ran that in 32 bit mode
I also found that in my laptop in the Microsoft Shared folder within program files, there exist Office 14 & 15 folders, but they don't exist in the newer laptops and the same in 32 bit folder of Program files(x86). Would it be possible that having those folders is making the difference?
Please help.
I have learned that installing Microsoft Access Database Engine 2010 (or 2007) on end-user machines fixes the issue, as adodb.dll file is required to be registered on computers using that provider.

Oracle 12c CentOS PDB Connection from client

I have an installation of Oracle 12c on a Windows Server 2012 machine. it has a single PDB (PDBORCL). I have created a user in this PDB and can connect to it from a client machine via SQL Developer using the user/pass for the user i created. the machine hostname and a Service Name of PDBORCL - GREAT!
I tried to replicate the same thing on an Oracle 12c install but I am having an issue of: TNS listener does not know of a service requested in the connect descriptor.
I have been around online and found maybe i should be putting a reference to the pdb into the tnsnames.ora file on the Cent machine - BUT if i look at the contents of the tnsnames.ora file and listener.ora file on the Windows machine they are still as defaults and contain no reference whatsoever to the PDB "PDBORCL" that i have on the windows installation - so how does it manage to connect fine and my linux box doesnt know what to do?
I guess im looking for general guidance around what should be in the tnsnames.ora file and listener.ora file on my linux machine so that i can access it from a client by referencing the PDB as the Service Name when i connect via SQL Developer.
Finally got it working on the Linux box. Reason was i was using PDBORCL as the Service Name. after logging on as SYSDBA and querying V$Services i could see that I should have been using pdborcl.localdomain
I'm still not too sure on why the tnsnames on the windows machine didn't explicitly need me to define the pdb though.

How to connect pervasive sql Database and Web Site using DSN

I am having an application that is running on IIS with Enabled 32 bit Application.
In a remote server(connection available in local machine),i have installed Pervasive SQL.
I have installed Pervasive SQL Driver in local machine and trying to connect the database "TestApplication" in Pervasive SQL.
For that I have created System DSN "DSNTEST", and tried with Windows Application.Its working fine.
But i couldnt connect to the database from Web Site.
An error occured "Error: ERROR [IM014] [Microsoft][ODBC Driver Manager] The specified DSN contains an architecture mismatch between the Driver and Application".
Can anyone please help me to resolve this?
Thanks in advance.
It sounds like the ASP.NET application is trying to run as a 64 bit application. Because you're using PSQL v11, you can install the 64 bit ODBC driver which is part of the PSQL v11 64 bit client install (at http://www.pervasive.com/database/Home/Products/PSQLv11.aspx).
The other option is to make sure that the ASP.NET project is built with a target of x86 rather than x64 or AnyCPU.

Resources