Accessing record using a Date
<p>Having a problems accessing a record in a database using date.  I'm doing something wrong here cannot remember if you need to have #.  What am I missing?</p>

<pre><code>SqlDataReader MyReader;
SqlConnection Conn;
Conn = new SqlConnection(@"Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\NoteBook.mdf;Integrated Security=True;User Instance=True");

SqlCommand MyCommand = new SqlCommand();
MyCommand.CommandText = "SELECT Id, Date, Note FROM NoteBook Where Date = #07/04/2011#";//Id = 1"; //; // + Message.Text + "";
MyCommand.CommandType = CommandType.Text;
MyCommand.Connection = Conn;

MyCommand.Connection.Open();
MyReader = MyCommand.ExecuteReader(CommandBehavior.CloseConnection);

while (MyReader.Read())
{
     TextBox1.Text = (string)MyReader["Note"];
}
</code></pre>
