Is there an easy way to distribute the Access Database Engine - visual-studio-2010

I'm using an Access Database (accdb) with my VB 2010 Application
I know I need to install the Access Database Engine on each workstation that needs to run my program.
However, I can see a logistical nightmare if I have to manually install the Access Database Engine on 100+ workstations manually.
I know a MSI doesn't exist. I'm looking for a solution to automate the installation of the Database Engine when the software installs.
Has anyone else overcome this problem.

If your application does not use any database features specific to the .accdb file format then you could greatly simplify matters by using an .mdb file to store your data. You could target your VB.NET project to the x86 (32-bit) environment and have it use the Microsoft.Jet.OLEDB.4.0 provider that is included with every Windows install. That way you could just distribute your app without having to worry about installing ACE.

Related

Software Installer package with database integration issue

Recently by using Visual Studio 2013 I have developed a program that displays alarm information based on its time and alarm tone settings. Those settings and files are stored in MySQL database.
The issue is:
Is there any way to install this application to another computer without requiring to export the database, install MySQL database and configuring it.
Just I want to Install the required database file and application at ones including to the Software installation package. or what you will advice me.
Using the Installshield Lite packaged with VS2013 you can create a setup that will include the setup of applications such as MySQL.
When the setup runs, it will install MySQL with the parameters provided. If you configure the application to use silent install as discussed here: https://dev.mysql.com/doc/refman/5.1/en/windows-installer-msi-quiet.html then the installation will be seen as 'part of' your setup.
For the settings, I would recommend creating a setup application (console app) that will read a .sql file etc and configure the database. This too can be run as a pre-requisite of your installation.
You can also do this all manually (i.e. write your own setup application that will call MySQL setup using Process class, install MySQL, create project folder, create shortcuts etc). The Installshield is not fully functional and a gets a lot of bad press, but will do the job for a quick/simple install.

Quick deployment of Visual Studio 2010 app with SQL database

I am new to Visual Studio 2010, so please bear with me. Back in the days of using VB6 combined with an Access database, all I had to do was to use the Package & Deployment wizard and include the database file in the setup. Then all the client had to do was run one setup file and the application would magically run right away (the database would be placed in the App Path).
Is there some way to create a setup file in VS 2010 which will also install SQL Server Express automatically, attach the database along with the application itself?
This is meant for people who do not have SQL server installed and they should be able to start using the app by running one single setup.
Thanks!
Yes, your setup based on Windows Installer and built with Visual Studio itself can deploy everything you need. Read this article on MSDN for more details (maybe you won't need ClickOnce but it contains a lot of links).
I guess you need some clarification about your options (I assume you want to use a Microsoft solution because you talked about SQLExpress).
Microsoft SQL Server: fully featured database engine. It costs (a lot) and deployment isn't easy as we would.
Microsoft SQL Server Express: free edition (with some limits) of the big brother. Same installation issues. Perfect for medium desktop or web applications.
Microsoft LocalDB: single or multiple file, single user, support for stored procedures and advanced data types as in higher versions, easy to deploy and (optionally) per-user execution. Perfect for small/medium desktop applications and developing (with some preconditions with web applications too).
Microsoft SQL Server Compact 4.0: single file, single user, small, in-process, very easy to deploy. Perfect for small single user applications or used as local data storage (VS2k10 C++ Intellisense, for example, uses a SQLCE DB).
Microsoft JET Engine: the old beloved Access. If you come from VB6 I guess you know this.
If (and this is a big IF) your application is intended for a single user and you don't need data-sharing, now Microsoft provides a new version of SQLServer Express called LocalDB.
This version runs as standalone executable (isn't a service).
Its major advantage is the easy installation.
Search for LocalDB or look at my question LocalDB deployment

Install a SQL Server database to a client's machine

I need to install a SQL Server 2008 database on several user machines. The users are not technically proficient, so I cannot create a script and just give it to them. I need to be able to create an executable that will create the database. The executable will check if the user has SQL Server 2008 Express installed, then install the database. The executable will install the database using Integrated Security, so I don't need the user's id or password.
I tried using the database project in Visual Studio 2010, but it just creates scripts.
Is there an open source solution to creating an executable that installs SQL Server databases?
May I suggest that you look at embedding SQLServer 2008 Express within your application.
Check the Microsoft link here.
Then you can check for an SQL instance and install one if it doesn't exist when the program first starts up.
A simple way would be to use SQL Server Management Objects (SMO) to create a .NET console application that creates the database.
Depending on your security rights on your user's machines you may be able to run the app from your workstation and deploy directly to their machines.
SMO can also be driven by powershell.

Can I use Sql Server CE (3.0) as an embedded database for my windows application? Do I have to install Sql Server CE in the machine?

I created a windows application and I needed a database for it. I first used SQL Server Express edition in it. Then I came to know that it is not exactly a portable database. That is, SQL Server Express edition should be already installed in the computer where I suppose to use my application. I came to know that I can use SQL CE instead and changed to it. I found somewhere that all I have to do is just copy the sqlceme30.dll in the application. Worked fine in my developement system. But when I copy the application to another system and open the application, it throws the error
System.IO.FileNotFoundException: Could not load file or assembly 'System.Data.SqlServerCe, Version=9.0.242.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The system cannot find the file specified.
Can I use SQL CE in my application? I really don't want to install it in all the machines I use my app. Or if not, which other db I can use without intalling? Access?
Ensure your reference is set to Copy Local. Right click on the reference, and click properties. They change the Copy Local property to true. That will ensure that the dll is included in the publish.

VB6 Package and deploy setup ask system restart

I found Vb6 tools package and deployment. I used it and created a package or setup file from my running vista operating system. Later when i tried deploying it in clients computer with winxp, it asks for update of system file and ask to restart. The process never ends just ask for update and restart. how should i create setup file to avoid this problem?
Edit:
If i create setup file in Win98 and deploy it in clients Vista or winxp then it runs fine...
There is a very good chance you are trying to deploy system files that you shouldn't. Typical examples include MSVCRT components.
You receive multiple "System files are out of date" error messages when you install a Visual Basic 6.0 application
Using Win9x can mask the problem because ancient versions are packaged. During installation either setup1 will detect that newer versions are already in place or Windows will fend them off via System File Protection. Vista is much better at this than XP was.
Yes, the PDW is old. For that reason you should seek out the MSKB articles on usage tips, newer information, and on manually updating the files PDW uses as guidance (its REDIST folder, VB6DEP.INI and the .DEP files that accompany many controls).
Best practices for deploying Visual Basic 6.0 applications is a good generalized starting point.
Many of these sorts of issues have been answered over the years since VB6 and the PDW were released.
The VB6 package and deployment tool is really dated. It doesn't play well with some of the new security features.
It's probably trying to install old copies of the VB6 runtimes and then Windows is restoring its own copies.
It's been a while, but can you remove the VB6 runtime files from the files to deploy in the Package and Deployment Wizard? If so, do so. As long as the computer being installed on has the latest service packs it will already have the VB6 runtimes on it.
If that doesn't solve your problem then check what other system files your deployment project has in it. In most cases you won't need to deploy any system files as modern, patched systems should have them all. There are a few activeX controls that may not be on modern systems, but those shouldn't cause these endless restart problems.
Alternatively, try another install technology. You could create a setup project in modern versions of Visual Studio. Alternatively there are some very good open-source and commercial products.
I've used this one quite successfully in the past:
http://nsis.sourceforge.net/Main_Page

Resources