Click here to Skip to main content
15,915,093 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm working on a Windows application that uses a Microsoft Access 2010 database in the backend to store file information.

Within the application I have included the following namespaces:
• System.IO
• System.Text
• System.Windows.Forms
• System.Data
• System.Data.OleDb

I also have Microsoft Access 2010 installed on the PC where I am developing this application.

Here is the problem: I can run the application on the development machine without any problems, but when I took the application to my XP machine where I have the exact same development software minus the MS-Access 2010 software it will not function unless I install the AccessDatabaseEngine application.

I want to run this application from a portable drive, so how can I include the Access database engine in my application? In other words I want to be able to use the Access database in my application without having to install the Access Database engine onto another PC.

Thanks,
Posted

1 solution

Then you must have MS Access Database file within your project.
Therefore, if you've modified the data in your machine, then you're moving this application to some other machine, you'd get the same database. Because now it's a part of your application.

And if you don't want to do this, and want to centralized the database, then your database must be on Database Server

or you can create such web service for managing all the database transaction, and you can have access to this service in multiple applications.

Hope you got the idea.

-KR
 
Share this answer
 
Comments
Quecumber256 7-Mar-14 11:19am    
Thanks for the comment, but I think you missed the point.

I took the entire VB project including the Access database and copied it to a USB drive. I started the XP copy of Visual Studio 2008 and opened the project there. When I pressed the F5 button to run the project I would get an Exception saying the Access database was not accessible.

I could not use the database at all until I installed the AccessDatabaseEngine onto the XP machine.

The only difference between the two PCs is: One has the Microsoft Access 2010 application installed and the XP PC doesn't.

I think there is some reference I need to install.
MRM256
Quecumber256 7-Mar-14 11:39am    
FYI - The exact exception error is: "Object reference not set to an instance of an object."
Krunal Rohit 7-Mar-14 11:40am    
Then you must have Access installed on other PC as well.

-KR
Quecumber256 7-Mar-14 12:12pm    
KR,
I don't want to have to install the AccessDatabaseEngine on any PC I might use. The whole point of the application is to place it on a portable drive and run it from there. In theory if I'm storing data in a local data store I should be able to access it without having to clutter up the host PC with other assemblies.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900