hi guys I am working with C# windows application and I am facing a problem with OLEDB connection to SQL SERVER 2008 my code is too simple: I am trying to fill the datagridview from this query
string connString = "Provider=SQLOLEDB;Data Source=servername;Initial Catalog=DBname;Integrated Security=SSPI";
string query = "SELECT * FROM account";
//create an OleDbDataAdapter to execute the query
OleDbDataAdapter dAdapter = new OleDbDataAdapter(query, connString);
//create a command builder
OleDbCommandBuilder cBuilder = new OleDbCommandBuilder(dAdapter);
//create a DataTable to hold the query results
DataTable dTable = new DataTable();
//fill the DataTable
dAdapter.Fill(dTable);
//the DataGridView
//DataGridView dgView = new DataGridView();
//BindingSource to sync DataTable and DataGridView
BindingSource bSource = new BindingSource();
//set the BindingSource DataSource
bSource.DataSource = dTable;
//set the DataGridView DataSource
dataGridView_FraudDetails.DataSource = bSource;
dAdapter.Update(dTable);
but I get the Following error in this line
//fill the DataTable
dAdapter.Fill(dTable);
"[DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access denied." The code was running well , but when I uninstalled the server and reinstalled it again it gave me that error
I tried to turn off the firewall but it doesn't work any suggestion please