Passing Datetime paramters to SQL Select

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm having a problem properly passing a datetime variable to SQL from C#. In the sqladapter's properties / SelectCommand / parameters when I hard code the Value to a date for selection purposes the datagrid is properly filled. However when I attempt to pass the date value collected from the date control, in this case ABDate.Value I get not results. What am I missing?
 
Can you post the Update command code?

--
W.G. Ryan MVP Windows - Embedded

Have an opinion on the effectiveness of Microsoft Embedded newsgroups?
Let Microsoft know!
https://www.windowsembeddedeval.com/community/newsgroups
JWH035 said:
I'm having a problem properly passing a datetime variable to SQL from C#.
In the sqladapter's properties / SelectCommand / parameters when I hard code
the Value to a date for selection purposes the datagrid is properly filled.
However when I attempt to pass the date value collected from the date
control, in this case ABDate.Value I get not results. What am I missing?
 
This is an inquiry only form, but I will try that and see what I get. The following is the error I recieve on the Select:

Additional information: The string was not recognized as a valid DateTime. There is a unknown word starting at index 0.
 
Back
Top