I have a calendar on a simple windows form and when I choose a date it will put the date into a textbox with the format YYYY-MM-DD
When I choose a date i look up in a MSAccess database if there is any appointments for the selected date.
In the file (where the database query is in) calendar.xsd i can use the query below and all my appontments is listed in my datagrid.
<CommandText>SE LECT * FROM tbNotification</CommandText>
But If I want to use the selected date that I have in my textbox, i get an error saying that "There is some values or parameters missing" (a simple translation from Swedish, don´t know the exact English translation). The Query I try to use is the one below:
<CommandText>SE LECT * FROM tbNotification WHERE ([Date] = '#'+txtSelDate+ '#')</CommandText>
I have tried:
- ALOT of syntaxes in the query string for the ## around the date
- putting the date as String, as Date etc etc
- putting the date as a variable (selDate = txtSelDate.text )
I have now tried everything I can think of. Does anyone of you guys a solution for my problem?
I'm extremely thankful for any help!
Have a nice easter! :)
When I choose a date i look up in a MSAccess database if there is any appointments for the selected date.
In the file (where the database query is in) calendar.xsd i can use the query below and all my appontments is listed in my datagrid.
<CommandText>SE LECT * FROM tbNotification</CommandText>
But If I want to use the selected date that I have in my textbox, i get an error saying that "There is some values or parameters missing" (a simple translation from Swedish, don´t know the exact English translation). The Query I try to use is the one below:
<CommandText>SE LECT * FROM tbNotification WHERE ([Date] = '#'+txtSelDate+ '#')</CommandText>
I have tried:
- ALOT of syntaxes in the query string for the ## around the date
- putting the date as String, as Date etc etc
- putting the date as a variable (selDate = txtSelDate.text )
I have now tried everything I can think of. Does anyone of you guys a solution for my problem?
I'm extremely thankful for any help!
Have a nice easter! :)
Comment