I think the problem is trying to send it down to SS05 as a DateTime. Better
to send it as a String.
Unless, I've misunderstood SQLDataSource, I believe that you specify .NET
datatypes for your SP params, not SS datatypes.
In other words, write the SP to accept a varchar param, not a datetime param
...... in the SP, use format 'yyyymmdd' and CAST(@datetime1 AS datetime) will
work ..........
Honestly, I'm not sure the VS05 GridView is such a great invention ....
despite all the hype.
"DWS" <DW*@discussions.microsoft.com> wrote in message
news:96**********************************@microsof t.com...
Maybe use date.parse
"John A Grandy" wrote:
VS05 : GridView control config'd to use SPs in SS05
One of the SPs takes a vchar(50) which in the T-SQL needs to be converted
to
a DateTime.
How should I have the GridView format the text the user enters in the
date
col ?
Currently, if user enters "2/14/2006" , I format it as '2/14/2006' ...
but
this gives me a runtime error:
Server Error in '/code' Application.
----------------------------------------------------------
The string was not recognized as a valid DateTime. There is a unknown
word starting at index 0.
My table has a primary key defined on an Identity col.