adding dates via Visual Basic

From: Jim Bishop <bishopjf_at_my-deja.com>
Date: Wed, 17 Jan 2001 20:41:10 GMT
Message-ID: <945014$hrl$1_at_nnrp1.deja.com>


[Quoted] I'm in Visual Basic and am trying to send a date to a 'date' column in an Oracle table. I have no problem with other types of data but I can't find the right combination of quotes to get the date to go in. I keep getting "Variable not in a valid date format". I think I have the field format right - when I put SYSDATE in it looks like this - January 17, 2001 9:26:25 AM. I'm using the ORADC visual basic control. Here's my code:

    ORADC1.Recordset.AddNew

    ORADC1.Recordset("integer_long") = 1234567890
    ORADC1.Recordset("float_single") = 123456.7
    ORADC1.Recordset("date_string") = "January 17, 2001 9:26:25 AM"

    ORADC1.Recordset.Update

Any ideas?

Jim

Sent via Deja.com
http://www.deja.com/ Received on Wed Jan 17 2001 - 21:41:10 CET

Original text of this message