Vb.Net Application installer not updating access database - database

As the title says my vb.net application installer is not updating the correct database, the application works fine when debugging with visual studio, however when i install it the database in the data directory is not updated to the latest.
I use "Microsoft Visual Studio Installer Projects" to make an installer with all the needed files, this is how i have set it up:
Application Folder:
Image
User Desktop: I have just a shortcut to the .exe in the application folder
User's Program Menu: I have a folder with the app name and inside that a shortcut to the .exe in the application folder
When installed into the computer the database is not the latest and i know this because when i try to use a button with an insert query the app gives back an error non being able to find a column, "ID_User", that i just recently added.
Database connection string:
Dim conn As New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=|DataDirectory|\Account.mdb")
More Info:
I used the visual studio deployment wizard to create the setup files instead of the Visual Studio project installer and the application works just fine so i assume its a problem just with the other installer and how its configured but i cant figure out whats the problem, i always used it and never had problems until the latest release.
Edit:
I tried adding the database inside the application folder in the Visual Studio project installer and setting the property of the database to always copy it inside the output directory, still no luck.

Solution:
I don't know either what happened but somehow i might have messed up something in the database while editing it, i made a new one with the same fields and replaced the old one, now everything works just fine.
Edit 08 Jan 2021:
Same problem happened again, and this time i think i know why... i edited the database again but i didnt open the file directly but from Visual Studio solution explorer and then edited it. When i tried installing the new version it didnt work again and when i changed the database it started working again. So i think the problem is that the visual studio db editor doesn't save changes somehow.

Related

I Cannot Install SQL Server 2019 Express. It gets stuck on Offline Installation of Microsoft Machine Learning Server Components

I'm trying to install SQL Server 2019 Express on my laptop. I initially click on custom to start and everything seems to go smooth up to the point where it's at the Offline Installation of Microsoft Machine Learning Server Components section.
When I get there I get a screenshot that looks like this:
From this point on I cannot figure out what to do next. I tried creating a directory, downloading all of the files listed to that directory, and enter that directory in the Install Path line. But when I do that the Next button still is disabled.
So what is the next step?
Thanks for any help
Download the 4 cab files below (same links in your screenshot):
SRO_3.5.2.125_1033.cab
SRS_9.4.7.25_1033.cab
SPO_4.5.12.120_1033.cab
SPS_9.4.7.25_1033.cab
then, create a new folder MLMcServer in your C: drive C:\MLMcServer.
Put the 4 files there without extracting them
Finally, return to the installation dialog and browse to the location of the created folder C:\MLMcServer
You, No need the Machine Learning Services – Offline. you can untick Machine Learning Services in the feature session. Otherwise, you need that. You have to download the correct files that match the version of SQL you're installing. The files you're using from that link provided will not work since it is an older version and you are installing 2019, have you tried: learn.microsoft.com/en-us/sql/advanced-analytics/install/sql-ml-component-install-without-internet-access?view=sql-server-ver15 Those are the current files for 2019 RTM.
Anyone using a SQL Server installer in another language should know that downloading the files and placing them in a folder for the installer to detect will not work. What worked for me is to use the English installer.
If you want you can use the SQL Server installer in another language, but uncheck the features of Microsoft Machine Learning Server; When you have finished installing the SQL Server instance and the other features, you must now run the installer in English, select that you want to add features to an existing instance, mark the missing features of Microsoft Machine Learning Server and go through the steps of downloading the files and place them in a folder, select the folder where the four files are and the Next button will work correctly.
Downloading the .cab files, does not work.
Downloading the .iso files, does not work.
Only solution is moving the client to mySQL, where they should have been all along.
Not being lead around the nose by Microsoft.

Install Two Instances of WPF Application on Same Machine

I have a WPF application. I used Visual Studio to publish it to a folder on my machine. I then clicked on the application to run it. Before running it, the application asked me if it is ok to install it. I answered in the affirmative. Then I changed the config file in Visual Studio to point to another database instance and published to a different folder. I clicked on this new application to run it. This time I was told that I cannot install the application as it was already installed on my machine. Any way around this issue?

Entity Framework : Unable to change DataSource for Code First Migrations

I am working on a project where I am using Entity Framework along with code first migrations to update my database. I started this project on another machine and it worked out very well. Now I checked out the code on another machine. Since this machine does not have the database, I ran update-database command in nuget. It should apply my previous migrations and create a new database on this machine but it is displaying following error.
error
I read this MSDN article which says
If a local SQL Express instance is available (installed by default with Visual Studio 2010) then Code First has created the database on that instance
If SQL Express isn’t available then Code First will try and use LocalDb (installed by default with Visual Studio 2012)
What I understand by this is when i enabled migrations in my first machine, it created database with SQLEXPRESS instance as DataSource and since I don't have that in my current machine, It is unable to create the database. So I am trying to change the DataSource of EntityFramework to the Instance of my current sql server which is LAPTOP-HD618J49. For this I tried to write a hard coded connection string with this instance in app.config, changed ContextName in Data Context class but to no avail. Please give me some directions on what I might be missing?
I finally resolved the issue. Earlier I tried to use base("name=ConnectionStringNameHere") but it didn't worked when I ran update-database command in package manager console. The strange reason is Visual Studio don't know which app.config to check for ConnectionStringName. Although I had already selected the module with entity framework in the dropdown of package manager console. I had to select the module with entity framework from the solution explorer window and set it as startup project. This somehow solved the problem and It was able to pick ConnectionStringName from app.config of the module with the updated DataSource.

SSDT Visual Studio 2013: Config file will not save

I created an SSIS package using Business Intelligence studio and since then have been given a new laptop on which I installed Visual Studio 2013. I also installed SSDT and converted this SSIS package.
We use config files as part of our deployment model.
I am now in the need adding DefaultBufferMaxRows and DefaultBufferSize as configurable properties. Everything looks fine until I click on Finish: the dtsconfig file is not updated and remains the same, although I receive a message confirming it was updated.
I am running as an administrator and I have full right on the folder where I try to save the config file. The Package Configuration Wizard has no issues retrieving the existing properties either.
Is this a common issue? What would be a good workaround?
Thanks in advance!

Each time I load my application, it attempts to repair the existing install. It is an issue with the vs2008 setup and deployment project

I have created a win forms application that is installed using a setup and deployment project. During a recent update to the setup and deployment project, I've caused a problem that I can not find the source of. Each time I click on the shortcut to my project, it runs the setup again. In effect it is repairing the install each time the shortcut is clicked.
Also, this issue is related to the shortcut that is created by the setup and deployment project. If I go directly to the console.exe file and run my application it does not attempt to repair it.
Using visual studio 2008 and I have custom actions that run on the install, however I can't see how they could cause the application to repair itself on load.
Thanks

Resources