Home » Infrastructure » Windows » Using OO40 and DateTime stamps (Oracle 10g, Windows Server 2000 , VB 6)
Using OO40 and DateTime stamps [message #305868] |
Wed, 12 March 2008 04:45 |
Vifferrider
Messages: 2 Registered: March 2008 Location: Systems Analyst
|
Junior Member |
|
|
Hi, First post
We are porting many of our systems away from MS SQL server to Oracle 10g, and I have been tasked with recording our VB6 programs to work with the new system
We are using the OIP10.TLB
To pass the information from the programs, which stores events as they happen we are using stored procedures on Oracle.
One of the procedure fields store the date and time of the event, down to the millisecond. This is so the integrity of the sequence of events is maintained.
Trouble is that Microsoft's DATE variable only allows DD/MM/YY HH:MM:SS to be stored, no facility for milliseconds.
The procedure works perfectly if I use DATE, but is missing the vital milliseconds, so the sequence goes to pot.
With OraDatabase.Parameters
.Add "d_DateTime", Now(), ORAPARM_INPUT, ORATYPE_DATE
.Add "v_System", sApplication, ORAPARM_INPUT, ORATYPE_VARCHAR2
.Add "v_Events", EV_Event, ORAPARM_INPUT, ORATYPE_VARCHAR2
.Add "v_Status", EV_Status, ORAPARM_INPUT, ORATYPE_VARCHAR2
End With
OraDatabase.ExecuteSQL ("begin JCMS_TRANS_PKG.INS_ENV_EVENTS_PR(:d_DateTime,:v_System,:v_Events,:v_Status);end;")
If I try to create a string and pass this to the procedure
With OraDatabase.Parameters
.Add "d_DateTime", MyTime, ORAPARM_INPUT, ORATYPE_DATE
.Add "v_System", sApplication, ORAPARM_INPUT, ORATYPE_VARCHAR2
.Add "v_Events", EV_Event, ORAPARM_INPUT, ORATYPE_VARCHAR2
.Add "v_Status", EV_Status, ORAPARM_INPUT, ORATYPE_VARCHAR2
End With
OraDatabase.ExecuteSQL ("begin JCMS_TRANS_PKG.INS_ENV_EVENTS_PR(:d_DateTime,:v_System,:v_Events,:v_Status);end;")
it will error " Variable is not a valid date"
Please can you advise how I can pass a valid date time to this procedure using milliseconds?
Thanks in advance
Rich
|
|
|
|
|
Re: Using OO40 and DateTime stamps [message #305907 is a reply to message #305890] |
Wed, 12 March 2008 05:52 |
|
Michel Cadot
Messages: 68728 Registered: March 2007 Location: Saint-Maur, France, https...
|
Senior Member Account Moderator |
|
|
Without code I can't comment an error.
By the way, -20003 error and associated message are custom and Oracle ones.
So search in the code of your procedure MESSAGE_PKG or JCMS_TRANS_PKG
Regards
Michel
|
|
|
Goto Forum:
Current Time: Sun Dec 22 06:33:28 CST 2024
|