Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > MySQL and ASP.NET question

Reply
Thread Tools

MySQL and ASP.NET question

 
 
Mvk
Guest
Posts: n/a
 
      04-28-2004
Hello;

I have a mysql database with a table column 'OrderUntil'. I declared this
column type: Time.
I get the value in my HTML code by using:
DataBinder.Eval(Container.DataItem, "OrderUntil");

Now I want to pass the resulting value to a function: GetHoursComboIndex as
follows:

GetHoursComboIndex((DateTime)(DataBinder.Eval(Cont ainer.DataItem,
"OrderUntil")))

The problem is: the DataBinder.Eval(Container.DataItem, "OrderUntil") value
cannot be casted to a DateTime value.
Any idea how I map the Time type OrderUntil column to a C# DateTime type ?
(or another type).

Regards
MVK


 
Reply With Quote
 
 
 
 
Robert Phillips
Guest
Posts: n/a
 
      04-28-2004
DateTime.Parse?

"Mvk" <(E-Mail Removed)> wrote in message
news:408f9c99$0$21473$(E-Mail Removed)...
> Hello;
>
> I have a mysql database with a table column 'OrderUntil'. I declared this
> column type: Time.
> I get the value in my HTML code by using:
> DataBinder.Eval(Container.DataItem, "OrderUntil");
>
> Now I want to pass the resulting value to a function: GetHoursComboIndex

as
> follows:
>
> GetHoursComboIndex((DateTime)(DataBinder.Eval(Cont ainer.DataItem,
> "OrderUntil")))
>
> The problem is: the DataBinder.Eval(Container.DataItem, "OrderUntil")

value
> cannot be casted to a DateTime value.
> Any idea how I map the Time type OrderUntil column to a C# DateTime type ?
> (or another type).
>
> Regards
> MVK
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using Python and Connecting to MySQL remotely WITHOUT MySQL installedon local computer dave Python 4 11-18-2010 04:19 AM
Re: How to insert PDF file in to MySql and read it from MySql toJAVA App Jeffrey H. Coffield Java 1 07-24-2009 12:29 AM
Re: How to insert PDF file in to MySql and read it from MySql to JAVA App Roedy Green Java 0 07-23-2009 05:30 PM
mySQL Ruby Gem and MAMP mySQL Mark Meijer Ruby 3 02-03-2008 04:19 AM
Has Anyone build A Mysql Module for ruby1.8.2 and Mysql 4.1.8 bin liu Ruby 1 12-22-2004 03:39 AM



Advertisments