私はテーブルをフィルタリングするためにこれを持っています。
using (SqlConnection myDatabaseConnection = new SqlConnection(myConnectionString.ConnectionString))
{
myDatabaseConnection.Open();
using (SqlCommand mySqlCommand = new SqlCommand("Select * from Employee WHERE EmpID >= @from AND EmpID <= @to", myDatabaseConnection))
{
mySqlCommand.CommandType = CommandType.Text;
mySqlCommand.Parameters.AddWithValue("@from", textBox1.Text);
mySqlCommand.Parameters.AddWithValue("@to", textBox2.Text);
{
ds = new DataSet();
adapter = new SqlDataAdapter(mySqlCommand);
adapter.Fill(ds, "Employee");
}
}
}
たとえば4001、textBox1 と4017texBox2 があります。4001、4002、の結果が得られます4003。. .4017
問題は、たとえば、textBox1 の I4001と textBox2 の none で、結果が得られません。4001テーブルの最後の値までの結果を得るにはどうすればよいですか? textBox1 が空で textBox24017が