Results 1 to 2 of 2

Thread: Editing an ORACLE Date Field

  1. #1
    Nick Matteucci Guest

    Editing an ORACLE Date Field

    What is the correct way to specify the format
    for an Oracle Date field when editing?

    Thanks,

    Nick

  2. #2
    Nick Matteucci Guest

    Editing an ORACLE Date Field (SOLUTION!)

    Hi Nick,
    Here is the asp code that works.
    Note the use of dbSilentCmdText, TO_CHAR in the dbSQL statement,
    and dbOptions.
    -------------------------------------------------------------------
    <%
    Set Mydb = Server.CreateObject(&#34;aspDB.EP&#34
    MyDb.dbDSN = &#34;DSN=local; UID=scott; PWD=tiger;&#34;
    Mydb.dbDbType = &#34;Oracle&#34;
    MyDb.dbUnit = 1
    MyDb.DBColor = &#34;4,auto,lightblue&#34;
    MyDb.dbImageDir = &#34;images/&#34;
    MyDb.dbGridTableTag = &#34;border=3 cellspacing=3 cellpadding=3&#34;
    MyDb.DbMode = &#34;Both&#34;

    MyDb.dbSQL = &#34;($~)SELECT EMP.EMPNO, EMP.ENAME, EMP.JOB, EMP.MGR,
    TO_CHAR(EMP.HIREDATE, &#39;MM/DD/YYYY&#39 HIREDATE, EMP.SAL, EMP.COMM, EMP.DEPTNO
    FROM EMP ORDER BY EMP.EMPNO&#34;
    Mydb.dbSilentCmdText = &#34;Alter Session Set NLS_DATE_FORMAT=&#39;MM/DD/YYYY&#39;&#34;
    Mydb.dbOptions = &#34;DateFormat=DD-MMM-YY&#34;

    MyDb.dbNavigation = &#34;top&#34;
    MyDb.dbNavigationItem = &#34;top, bottom, next, prev, update,&#34;
    MyDb.dbNavigationIcon = &#34;std&#34;
    MyDb.dbEditParams = &#34;TableName=SCOTT.EMP,BookMarkFlds=0,TableTag=B ORDER=2,&#34;
    MyDb.dbEditFlds = &#34;1,2,3,4,5,6,7&#34;
    MyDb.aspDBEP
    %>
    -------------------------------------------------------------------------



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •