0 Replies Latest reply on Jan 10, 2005 8:21 PM by 436119

    How to manipulate timestamp in ASP/VBScript

    436119
      Hi,

      I'm using OO4O to access an Oracle database from ASP. How do I manipulate a timestamp field in VBScript?

      example code:

      Dim conn, db, rs

      Set conn = Server.CreateObject("OracleInProcServer.XOraSession")
      Set db = conn.DbOpenDatabase("database","user/password",CInt(0))
      Set rs = db.DbCreateDynaset("SELECT DOB FROM employees WHERE rownum = 1",CInt(0))

      Errors:

      Response.Write rs("DOB").Value -> Missing Default Property
      DatePart("yyyy",rs("DOB").Value) -> Object doesn't support this property or method
      CDate(rs("DOB").Value) -> Object doesn't support this property or method
      CStr(rs("DOB").Value) -> Object doesn't support this property or method

      Note that the value of DOB for the record in question is a valid timestamp (ie it's not NULL).