Asked by:
the underlying provider failed on open

Question
-
I am having a nightmarish start on my first program.when i finished my program i used innosetup and put all the required files including the database for me me to make a setup file.When ever i install the program on another computer it gives me a the underlying provider failed on open error. Here is the connection code and connection string below
if (string.IsNullOrEmpty(txtbxusername.Text)) { MessageBox.Show("Please enter username", "Message", MessageBoxButtons.OK, MessageBoxIcon.Warning); txtbxusername.Focus(); return; } try { using (LoginEntities data = new LoginEntities()) { var query = from o in data.Users where o.username == txtbxusername.Text && o.password == txtbxPassword.Text select o; if (query.SingleOrDefault() != null) { MessageBox.Show("You have been authenticated sucessfully.", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information); //add process here MainPage main = new MainPage(); main.Show(); this.Hide(); } else { MessageBox.Show("You have input the wrong credentials", "Message", MessageBoxButtons.OK, MessageBoxIcon.Information); } } } catch (Exception ex) { MessageBox.Show(ex.Message, "Message", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
<connectionStrings>
<add name="Taona_File_Reference_Locator.Properties.Settings.VIMBISOConnectionString" connectionString="Data Source=.\vimbiso;Initial Catalog=VIMBISO;Integrated Security=True" providerName="System.Data.SqlClient" />What can i do so i can rectify the issue and how do i install the software on a different machine.
Your assistance is greatly appreciated
- Edited by mcfee12345 Tuesday, July 23, 2019 10:10 AM
Tuesday, July 23, 2019 9:50 AM
All replies
-
-
Thank you Olaf
Yes the named instance is vimbiso and it is running.I cannot connect using ssms
Tuesday, July 23, 2019 10:12 AM -
Yes the named instance is vimbiso and it is running.I cannot connect using ssms
So what error message do you get exactly?
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se
Tuesday, July 23, 2019 11:19 AM -
You are using Entity Framework, so may this article helps you: https://techcommunity.microsoft.com/t5/SQL-Server-Support/Error-quot-The-underlying-provider-failed-on-Open-quot-in-Entity/ba-p/317161
Olaf Helper
[ Blog] [ Xing] [ MVP]Tuesday, July 23, 2019 11:27 AM