python (12.9k questions)
javascript (9.2k questions)
reactjs (4.7k questions)
java (4.2k questions)
java (4.2k questions)
c# (3.5k questions)
c# (3.5k questions)
html (3.3k questions)
How to display a query in a textbox in C# with connection of SQL
Hi I was working in C# I want to a button for calculate average of
some numbers.
Here is my code:
private void button5_Click(object sender, EventArgs e)
{
connect.Open();
string a...
surrealduck
Votes: 0
Answers: 1
'ExecuteNonQuery requires an open and available Connection. The connection's current state is closed.' - C#
The code:
private void btnSave_Click(object sender, EventArgs e)
{
using (con = new SqlConnection(connectionString))
{
SqlCommand c...

Richard Johnson
Votes: 0
Answers: 1
System.InvalidOperationException: 'The ConnectionString property has not been initialized.' - C#
The code:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
usin...

Richard Johnson
Votes: 0
Answers: 2
Issues while Creating an entity connection from a SQL Connection
We are converting our DB access to use Azure Identity with EF. I tried various different methods and failed because EF is expecting a model to be created and passed into the connection string which i ...
Amy
Votes: 0
Answers: 1