Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> ProC and Date,Times Inserting

ProC and Date,Times Inserting

From: Robert Ogren <rmogren_at_gte.net>
Date: Mon, 29 Jun 1998 17:14:50 -0700
Message-ID: <6n9ajp$fpf$1@news-1.news.gte.net>


I'm trying to insert into a table a struct that contains a timeperiod formatted as "MM/DD/YYYY HH:MM:SS"

I have done the following based on what the Proc manual shows exept none of the examples
use time and date together. It doesn't reference time anywhere in the book.
Any information is appreciated.

Thanks

Rob

This is basically what I have.

void OrcInsertRecords(glob_CallStatus_t *callstatus,int cnt, void **idata)
{

    char tabname[31];
    omcEcell **ecell;
    omcEcell_st *ecellst;

    omcBSC   **bsc;
    omcMSC   **msc;
    omcDAP   **dap;
    omcSite  **site;

    int i;
    char *mMDDYYYY = "MM/DD/YYYY HH:MI:SS"; < according to the manual except for the time values

    EXEC SQL WHENEVER SQLERROR DO OrsqlError(callstatus);

    EXEC SQL CONTEXT OBJECT OPTION SET DATEFORMAT TO :mMDDYYYY;

        /*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         * What data do we want to process
         *~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
    switch (callstatus->code) {
        case ECELL:     ecell = (omcEcell **) idata;
                        ecellst = &ecell[0]->omc_st;
                        EXEC SQL FOR :cnt INSERT INTO TBLDAYECELL
values(:ecellst);
                        break;


Received on Mon Jun 29 1998 - 19:14:50 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US