Hi Guys ,
i am trying to connect date time picker to database.So what i am trying to do is when user select a date in the datretime picker ,it should display all the words added on that particular day.Can anyone help me with this.Thanks
sdhawan
-2
Junior Poster
Recommended Answers
Jump to PostSELECT words FROM TableWords WHERE date = @date
SqlConnection dbConnection = new SqlConnection(CONNECTION_STRING); string commandString = "SELECT words FROM TableWords WHERE date = @date"; SqlCommand commandStatement = new SqlCommand(commandString, dbConnection); commandStatement.Parameters.Add("@date", SqlType.SmallDatetime).Value = DateTimePicker1.Value; DataReader results = commandStatement.ExecuteReader(); ....
Jump to PostSqlDbType :)
Jump to PostIt's another question, isn't it? please if thread question answered mark it as solved and open another thread.
Consistency Required :)
All 12 Replies
Ramy Mahrous
401
Postaholic
Featured Poster
sdhawan
-2
Junior Poster
Ramy Mahrous
401
Postaholic
Featured Poster
sdhawan
-2
Junior Poster
Ramy Mahrous
401
Postaholic
Featured Poster
sdhawan
-2
Junior Poster
Ramy Mahrous
401
Postaholic
Featured Poster
sdhawan
-2
Junior Poster
Ramy Mahrous
401
Postaholic
Featured Poster
sdhawan
-2
Junior Poster
Ramy Mahrous
401
Postaholic
Featured Poster
sdhawan
-2
Junior Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.