By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,851 Members | 1,118 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,851 IT Pros & Developers. It's quick & easy.

Passing Datetime paramters to SQL Select

P: n/a
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?
--
JWH035
Nov 16 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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/...ity/newsgroups
"JWH035" <JW****@discussions.microsoft.com> wrote in message
news:40**********************************@microsof t.com...
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? --
JWH035

Nov 16 '05 #2

P: n/a
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.
--
JWH035
"William Ryan eMVP" wrote:
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/...ity/newsgroups
"JWH035" <JW****@discussions.microsoft.com> wrote in message
news:40**********************************@microsof t.com...
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?
--
JWH035


Nov 16 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.