Monthly Archives: July 2011

Solution for “OraOLEDB.Oracle Provider is not registered” error

While connecting from an ASP.NET application to an Oracle database via OLEDB I got following error:

OraOLEDB.Oracle Provider is not registered on the local machine

Now I know that the driver was installed and registered. I downloaded an official driver from Oracle WebSite. In my case it was ODAC112021Xcopy_x64.zip 64-bit version for XCopy deployment. It installs in 2 easy steps:

  1. Unzip downloaded file into any folder
  2. Run (as administrator) command: INSTALL TYPE PATH NAME DEPENDANCIES

Where

  • TYPE – type of installation (e.g. OLEDB, basic etc.)
  • Path – where you want driver installed
  • Name – Oracle home name
  • Dependencies – true/false whether to install dependencies (e.g. instant client)

So my command was

INSTALL ALL “C:\Program Files\Oracle64Driver” Oracle64Driver TRUE

Which copied the files and created correct Registry entries (I checked). And still I was getting the error. I Googled it (a lot) but majority of suggestions was that the error is due to Windows ACL and correct permissions should be set on the driver folder. Didn’t help me.

So I fired up trusted ProcessMonitor and it showed that W3WP.EXE (ASP.NET process) was trying to access missing OCI.DLL file in the path C:\Program Files\Oracle64Driver\Bin, e.g. in the Bin folder of the path were the driver was installed. Looking back at the place were I unzipped the original driver files I found that DLL inside of “instantclient” folder. So I copied entire content of that folder into Bin folder at the destination. And Voila! The error disappeared.

Apparently Instant Client files aren’t copied by the installer even when Dependencies option is set to true.

Solution for UltraWebGrid missing scrollbars

I was working with classic Infragistics UltraWebGrid when noticed strange thing – even though scrollbars were enabled for the grid, the grid had fixed size and number of rows was bigger than the grid could display – no scrollbars appeared. For me it was a combination of grid being shown in a modal dialog in IE7 browser, but it could happen in other scenarios.

I also noticed when grid experienced any kind of user interaction (row added, row selected, checkbox cell checked etc.) scrollbars would magically appear. So the solution? Simulate user interaction. For example this code can be included in grid’s client-side InitializeLayout event:

function xMyGrid_InitializeLayout() {
    var oGrid = igtbl_getGridById('xMyGrid')
    oGrid.Rows.getRow(0).setSelected(true);
    oGrid.Rows.getRow(0).setSelected(false);
}

What happens here is first row of the grid is selected and an instant later unselected. It happens so fast that there’s no visual indication. But the grid gets its “user interaction” and scrollbars appear.