For the life of me I can’t get the result of a SELECT statement in a c# variable (SQL in winforms)
private void Form2_Load(object sender, EventArgs e) { LoginPage LP = new LoginPage(); int ID = LP.ID; // Setting buttons as user’s subjects. #region mainPageConnection.Open(); SqlCommand subject1Command = new SqlCommand(“SELECT Subject_1 FROM SubjectsTable WHERE ID = ‘” + ID + “‘”, mainPageConnection); string subject1 = (string)subject1Command.ExecuteScalar(); btnSubject1.Text = subject1; Working on a winforms project. For now […]
Sql Server managent studio and c# winform
i have created a c# winform application which connected through the sql server management studio via a userId and password there is a some scanning activity and after the activity completes it store data in the database this process is working fine but suddenly it stopped inserting data into table after the 30544 rows, i have checked the connection string, communication is ok because it is retrieving values from database for starting the scanning, also it is not displaying any error on the screen, i dont know why this problem occured please help….