473,320 Members | 1,832 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Passing Datetime paramters to SQL Select

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
2 7047
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: zlatko | last post by:
There is a form in an Access Project (.adp, Access front end with SQL Server) for entering data into a table for temporary storing. Then, by clicking a botton, several action stored procedures...
6
by: mirza i | last post by:
in asp i have this line: ..... Set paramsx = cmdUpdatex.CreateParameter ("@invdate", addate, adParamInput, 50, invdate) cmdUpdatex.Parameters.Append paramsx ... (the invdate value is a...
4
by: js | last post by:
I have a stored procedure named "processInventory" like the following. Depending on the passed in parameters, I would like to add a WHERE clause for "select" action. For example, if any varchar...
2
by: Bob | last post by:
I'm new to Access projects and SQL server and am not a veteran VB programmer. There's a cry for help! I'm attempting to print the current form on screen by using a command button which the user...
9
by: laurenq uantrell | last post by:
I've gotten sort of fed up with dealing with regional date settings on the client side and am considering the following scheme - just wondering if anyone has a negative view of it or not: ...
15
by: Steve | last post by:
I am trying to develop a stored procedure for an existing application that has data stored in numerous tables, each with the same set of columns. The main columns are Time and Value. There are...
0
by: Iain McIntosh | last post by:
Hello if anyone can help me with this I will be very grateful. I have a working version of this program as a windows application, when I try to port it over to c# ASP.NET I can't make it work. ...
2
by: klaus | last post by:
Hello, I want to pass a parameter to an xslt using saxon on a windoes 2000 system. I'm using this command line in a batch file: java -jar c:\programme\saxon\saxon8.jar -v -novw -o...
6
by: Manikandan | last post by:
Hi, I need to insert the datetime with milliseconds value into a datarow. My code as below DataTable testDataTable=new DataTable(); testDataTable.Columns.Add("updatedDateTime",...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.