Unable to include oledb32.dll into deployment project

Posted on 2003-11-11
Last Modified: 2013-11-18

I'm trying to make a deployment and setup project in order to deploy my application. I'm currently having difficulty in deploying my app.
Firstly when i try to use the wizard for the deployment project it searches for all the dependencies and among those oledb32.dll is included. It lists the following when it detect this dependency:

"The following files may have dependencies that cannot be determined automatically. Please confirm that all the dependencies have been added to the project
c:\program files\common files\system\ole db\oledb32.dll"

How do i check the dependecies of this file for my project manually?

When trying to build the solution with the deploy & setup project included it generates an error when oledb32.dll is included in the project. If i exclude it the solution compiles fine.
It generates the following error when compiling with it included:
"oledb32.dll' should be excluded because its source file 'C:\Program Files\Common Files\System\Ole DB\oledb32.dll' is under Windows System File Protection."

I know that the common files folder is read-only and i have tried to remove this but to no use (it actually turns back to read-only as soon as you click ok on the properties window after de-checking it)

So how do i successfully include oledb32.dll into my deployment project?
Please help - I really need to get my deployment working soon.


Question by:KjartanM-S
  • 4
  • 2
  • 2
LVL 44

Expert Comment

ID: 9726942
there are no additional dependencies for oledb32.dll, so you can safely confirm that all (as there are none) have been added.

oledb32.dll SHOULD already be presnet on almost any PC, so you should not need it in your installation package.

Author Comment

ID: 9727010

Yes, the oledb32.dll is present in the common files folder on the target folder. I don't know if it matters for my program whether oledb32.dll is there already or the setup installs it (and then resides in the application folder of my app.)? (i assume it doesn't matter)

Do you know if it is coz it is already in the common files folder (on all comps??) that it will not be included in the deployment project (that you are not meant to distribute this)?
Something is wrong with my deployment and i would like to know for sure that oledb32.dll's inclusion or exclusion from the deployment has nothing to do with my app not working on target comp. (it works fine when installed on comp used for development)

LVL 44

Accepted Solution

Arthur_Wood earned 250 total points
ID: 9727105
yes, since oledb32.dll is already installed, your program will be able to find and use it.

but WHY are you using oledb32.dll, when you should be build .NET apps utilizing ADO.NET, which does not rely on OLEDB32.DLL which is a COM library.

what other errors are you getting with our application?


Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.


Author Comment

ID: 9727264
Actually not sure why it is using oledb32.dll to be honest.

I developed my app in VB.NET and using a SQL Server 2000 database. I think that i have used the ADO.NET way of connecting to the least i read the book on ADO.NET by MS press and followed this using sqlDataAdapter and sqlConnection in the System.Data.SqlClient namespace and the DataSet

The only thing i used beside this is a call to the DataLink (to make a datalink file for the connection string) form but even that uses a ADODB connection, but i have commented the whole sub out coz i suspected this caused some trouble in the app but the oledb32.dll still is listed in the dependencies.
I also have a few CrystalReports in the project, with the SQL Server provider selected (could it be this that needs oledb32.dll?)

My app runs fine now when "deployed" to the developing comp.
Trying to deploy it on the target comp (with a clean XP pro installation and .NET Frameworks 1.1 installed) it crashes as i try to launch it:
"This program created an exception that could not be handled."
Then it lists the process id and thread id
The JIT debugger is not present - not sure how to include it or how much it would tell me if it was there.
I basically have no clue to what is causing my program to crash like this. I was under the impression that deploying for .NET was pretty much straight forward. The framework should include what was former distributed in the VB runtime package and included in any deployments.


PS: It can take some time before i am back in the discussion.....bedtime....followed by work

LVL 15

Expert Comment

ID: 9727343

Author Comment

ID: 9730079

I read the article and tried to deploy a Hybrid solution, but my app still crashes on the target computer just like before.

LVL 15

Assisted Solution

Raisor earned 250 total points
ID: 9730538
Well, sorry about the MS article ... I thought it could solve your problem ...

... I wouldn't like to send you on the "mary go round trip" but maybe this one can help you solving your problem:

It describes a vjsharp application problem with the same error message as yours after distribution ... since the problem has been solved with the article it might give you the a push in the right direction ...

Best regards, Raisor

Author Comment

ID: 9734785
Hi again

Raisor; Looking into that last article of yours and going to experiment with different exception handling.
Correct me if i'm wrong, but isn't simply Exception the "root" of all exceptions in VB.NET? Shouldn't the following catch everything:
catch ex as exception
   'do something
end try

Anyway, a last question if i may. Do any of you know how to get the JIT debugger onto the target comp and whether this will give intelligent info??



Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preface This article introduces an authentication and authorization system for a website.  It is understood by the author and the project contributors that there is no such thing as a "one size fits all" system.  That being said, there is a certa…
Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL ( several years ago, it seemed like now was a good time to updat…
The viewer will learn how to dynamically set the form action using jQuery.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question