-
Editing an ORACLE Date Field
What is the correct way to specify the format
for an Oracle Date field when editing?
Thanks,
Nick
-
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("aspDB.EP"
MyDb.dbDSN = "DSN=local; UID=scott; PWD=tiger;"
Mydb.dbDbType = "Oracle"
MyDb.dbUnit = 1
MyDb.DBColor = "4,auto,lightblue"
MyDb.dbImageDir = "images/"
MyDb.dbGridTableTag = "border=3 cellspacing=3 cellpadding=3"
MyDb.DbMode = "Both"
MyDb.dbSQL = "($~)SELECT EMP.EMPNO, EMP.ENAME, EMP.JOB, EMP.MGR,
TO_CHAR(EMP.HIREDATE, 'MM/DD/YYYY' HIREDATE, EMP.SAL, EMP.COMM, EMP.DEPTNO
FROM EMP ORDER BY EMP.EMPNO"
Mydb.dbSilentCmdText = "Alter Session Set NLS_DATE_FORMAT='MM/DD/YYYY'"
Mydb.dbOptions = "DateFormat=DD-MMM-YY"
MyDb.dbNavigation = "top"
MyDb.dbNavigationItem = "top, bottom, next, prev, update,"
MyDb.dbNavigationIcon = "std"
MyDb.dbEditParams = "TableName=SCOTT.EMP,BookMarkFlds=0,TableTag=B ORDER=2,"
MyDb.dbEditFlds = "1,2,3,4,5,6,7"
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
-
Forum Rules
|
|