[Solved] IF A BLANK SPACE IS PRESENT IN THE COLUMN HEADING …..AND/OR operator not working in sql statement in c# .net for modifying an excel sheet [closed]

I’m pretty sure that the problem is the space in the name of your Faculty Name column and that this has nothing to do with the use of AND or OR. Please try: sql = “Update [Sheet1$] set A1 = ‘a’ ” + “where Designation = ‘Prof(senior)’ and [Faculty Name] = ‘bob'”; 1 solved IF … Read more

[Solved] Reading A Fixed Format Text File – Part 2

I ended up going with a slightly different solution. The solution to the “Could not find installable ISAM” exception was to use the following: string EXTENDED_PROPERTIES = @”Extended Properties=””Text;HDR=YES;FMT=FixedLength;”””; The key to the solution is the “(s) around the “Extended Properties” values. I was able to populate the DataTable with the contents of the file, … Read more

[Solved] Reading A Fixed Format Text File – Part 3

You have not initialized MyDataTable by a data after instantiation, you have filled in data set but not a data table. So just try out MyDataSet.Tables[0] instead of MyDataTable.AsEnumerable() // DataSet filled in but data table still empty! MyDataAdapter.Fill(MyDataSet,”STUFF”); 1 solved Reading A Fixed Format Text File – Part 3

[Solved] i cant insert data in ms access database through textbox [closed]

maybe you can try this code private void button1_Click(object sender, EventArgs e) { try { cmd = new OleDbCommand(); cmd.CommandType = CommandType.Text; cmd.CommandText = “INSERT INTO userinfo (FirstName, LastName, Age, Address, Course)” + “VALUES (@First_Name, @Last_Name, @Age, @Address, @Course)”; cmd.Parameters.AddWithValue(“@First_Name”, textBox1.Text); cmd.Parameters.AddWithValue(“@Last_Name”, textBox2.Text); cmd.Parameters.AddWithValue(“@Age”, textBox3.Text); cmd.Parameters.AddWithValue(“@Address”, textBox5.Text); cmd.Parameters.AddWithValue(“@Course”, textBox5.Text); cmd.Connection = conn; conn.Open(); clear(); cmd.ExecuteNonQuery(); … Read more