Oracle and asp.....still cannot figure this out.

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • clinttoris@hotmail.com

    Oracle and asp.....still cannot figure this out.

    Could some please finish this line of code. For the life of me
    whatever I try it does not work.

    I am trying to insert the current date time into oracle. Now I know
    that in oracle if I run

    select to_char(sysdate , 'dd/mm/yy hh24:mi:ss') from dual

    result would be 15/06/06 14:49:35

    Now I want to insert this syntax into my asp code so what I have done
    is created a variable and in my insert statement called the variable.
    Still does not work

    testing = to_char(sysdate , 'dd/mm/yy hh24:mi:ss')
    ssqlCheckBox = "INSERT INTO
    Survey_User_Ans wer(Survey_Id,Q uestion_Id,Answ er_Id,Date_Answ er,User_ID)
    VALUES (" & SurveyID & ",'" & objRS("Question _Id") & "' , '" &
    answerChoices(a nswerChoice) & "' , "& testing & ", 'user')"

    Also, I would like to insert into my insert statement but have no idea
    Dim userrequested
    userrequested = Request.ServerV ariables("LOGON _USER")

    ssqlCheckBox = "INSERT INTO
    Survey_User_Ans wer(Survey_Id,Q uestion_Id,Answ er_Id,Date_Answ er,User_ID)
    VALUES (" & SurveyID & ",'" & objRS("Question _Id") & "' , '" &
    answerChoices(a nswerChoice) & "' , to_char('&sysda te&', 'dd/mm/yy
    hh24:mi:ss'), 'userrequested' )"

  • Turkbear

    #2
    Re: Oracle and asp.....still cannot figure this out.

    On 15 Jun 2006 12:00:36 -0700, clinttoris@hotm ail.com wrote:
    [color=blue]
    >Could some please finish this line of code. For the life of me
    >whatever I try it does not work.
    >
    >I am trying to insert the current date time into oracle. Now I know
    >that in oracle if I run
    >
    >select to_char(sysdate , 'dd/mm/yy hh24:mi:ss') from dual
    >
    >result would be 15/06/06 14:49:35
    >
    >Now I want to insert this syntax into my asp code so what I have done
    >is created a variable and in my insert statement called the variable.
    >Still does not work
    >
    >testing = to_char(sysdate , 'dd/mm/yy hh24:mi:ss')
    >ssqlCheckBox = "INSERT INTO
    >Survey_User_An swer(Survey_Id, Question_Id,Ans wer_Id,Date_Ans wer,User_ID)
    >VALUES (" & SurveyID & ",'" & objRS("Question _Id") & "' , '" &
    >answerChoices( answerChoice) & "' , "& testing & ", 'user')"
    >
    >Also, I would like to insert into my insert statement but have no idea
    >Dim userrequested
    >userrequeste d = Request.ServerV ariables("LOGON _USER")
    >
    >ssqlCheckBox = "INSERT INTO
    >Survey_User_An swer(Survey_Id, Question_Id,Ans wer_Id,Date_Ans wer,User_ID)
    >VALUES (" & SurveyID & ",'" & objRS("Question _Id") & "' , '" &
    >answerChoices( answerChoice) & "' , to_char('&sysda te&', 'dd/mm/yy
    >hh24:mi:ss') , 'userrequested' )"[/color]


    The best way I have found to debug concatenated strings ( especially those with single and double quotes) is to use a
    Response.Write, so instead of sending your
    statement to Oracle, do a

    Response.Write( ssqlCheckBox)
    assume :
    Survey_ID=Meant est
    objRS("Question _ID") =23
    answerChoices(a nswerChoice) = Yes
    user =JVG
    then it will need to end up ( somehow) like this:

    Insert into Survey_User_Ans wer(Survey_Id,Q uestion_Id,Answ er_Id,Date_Answ er,User_ID)
    VALUES ('Meantest','23 ','Yes',To_char (sysdate,'dd/mm/yy hh24:mi:ss'),'J VG' )








    Comment

    • clinttoris@hotmail.com

      #3
      Re: Oracle and asp.....still cannot figure this out.

      Hello Turkbear,

      This was an excellent suggestion as now I have the insert statement
      that I need to be processed into the database. However, now I am
      confused as to why it is not inserting. Once I try and actually insert
      this into the database I get this error
      Error Type:
      Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
      [Oracle][ODBC][Ora]ORA-01843: not a valid month
      /itsurvey/testSubmission. asp, line 72

      Any ideas?

      Here is the insert string
      INSERT INTO
      Survey_User_Ans wer(Survey_Id,Q uestion_Id,Answ er_Id,Date_Answ er,User_Id)
      VALUES (1,'1', 'e', '16/06/2006 11:09:20 AM')

      I have used the function Now() for datetime.


      Thanks again


      Turkbear wrote:[color=blue]
      > On 15 Jun 2006 12:00:36 -0700, clinttoris@hotm ail.com wrote:
      >[color=green]
      > >Could some please finish this line of code. For the life of me
      > >whatever I try it does not work.
      > >
      > >I am trying to insert the current date time into oracle. Now I know
      > >that in oracle if I run
      > >
      > >select to_char(sysdate , 'dd/mm/yy hh24:mi:ss') from dual
      > >
      > >result would be 15/06/06 14:49:35
      > >
      > >Now I want to insert this syntax into my asp code so what I have done
      > >is created a variable and in my insert statement called the variable.
      > >Still does not work
      > >
      > >testing = to_char(sysdate , 'dd/mm/yy hh24:mi:ss')
      > >ssqlCheckBox = "INSERT INTO
      > >Survey_User_An swer(Survey_Id, Question_Id,Ans wer_Id,Date_Ans wer,User_ID)
      > >VALUES (" & SurveyID & ",'" & objRS("Question _Id") & "' , '" &
      > >answerChoices( answerChoice) & "' , "& testing & ", 'user')"
      > >
      > >Also, I would like to insert into my insert statement but have no idea
      > >Dim userrequested
      > >userrequeste d = Request.ServerV ariables("LOGON _USER")
      > >
      > >ssqlCheckBox = "INSERT INTO
      > >Survey_User_An swer(Survey_Id, Question_Id,Ans wer_Id,Date_Ans wer,User_ID)
      > >VALUES (" & SurveyID & ",'" & objRS("Question _Id") & "' , '" &
      > >answerChoices( answerChoice) & "' , to_char('&sysda te&', 'dd/mm/yy
      > >hh24:mi:ss') , 'userrequested' )"[/color]
      >
      >
      > The best way I have found to debug concatenated strings ( especially those with single and double quotes) is to use a
      > Response.Write, so instead of sending your
      > statement to Oracle, do a
      >
      > Response.Write( ssqlCheckBox)
      > assume :
      > Survey_ID=Meant est
      > objRS("Question _ID") =23
      > answerChoices(a nswerChoice) = Yes
      > user =JVG
      > then it will need to end up ( somehow) like this:
      >
      > Insert into Survey_User_Ans wer(Survey_Id,Q uestion_Id,Answ er_Id,Date_Answ er,User_ID)
      > VALUES ('Meantest','23 ','Yes',To_char (sysdate,'dd/mm/yy hh24:mi:ss'),'J VG' )[/color]

      Comment

      • Turkbear

        #4
        Re: Oracle and asp.....still cannot figure this out.

        On 16 Jun 2006 08:10:27 -0700, clinttoris@hotm ail.com wrote:
        [color=blue]
        >Hello Turkbear,
        >
        >This was an excellent suggestion as now I have the insert statement
        >that I need to be processed into the database. However, now I am
        >confused as to why it is not inserting. Once I try and actually insert
        >this into the database I get this error
        >Error Type:
        >Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
        >[Oracle][ODBC][Ora]ORA-01843: not a valid month
        >/itsurvey/testSubmission. asp, line 72
        >
        >Any ideas?
        >
        >Here is the insert string
        >INSERT INTO
        >Survey_User_An swer(Survey_Id, Question_Id,Ans wer_Id,Date_Ans wer,User_Id)
        >VALUES (1,'1', 'e', '16/06/2006 11:09:20 AM')
        >
        >I have used the function Now() for datetime.
        >
        >
        >Thanks again
        >
        >
        >Turkbear wrote:[color=green]
        >> On 15 Jun 2006 12:00:36 -0700, clinttoris@hotm ail.com wrote:
        >>[color=darkred]
        >> >Could some please finish this line of code. For the life of me
        >> >whatever I try it does not work.
        >> >
        >> >I am trying to insert the current date time into oracle. Now I know
        >> >that in oracle if I run
        >> >
        >> >select to_char(sysdate , 'dd/mm/yy hh24:mi:ss') from dual
        >> >
        >> >result would be 15/06/06 14:49:35
        >> >
        >> >Now I want to insert this syntax into my asp code so what I have done
        >> >is created a variable and in my insert statement called the variable.
        >> >Still does not work
        >> >
        >> >testing = to_char(sysdate , 'dd/mm/yy hh24:mi:ss')
        >> >ssqlCheckBox = "INSERT INTO
        >> >Survey_User_An swer(Survey_Id, Question_Id,Ans wer_Id,Date_Ans wer,User_ID)
        >> >VALUES (" & SurveyID & ",'" & objRS("Question _Id") & "' , '" &
        >> >answerChoices( answerChoice) & "' , "& testing & ", 'user')"
        >> >
        >> >Also, I would like to insert into my insert statement but have no idea
        >> >Dim userrequested
        >> >userrequeste d = Request.ServerV ariables("LOGON _USER")
        >> >
        >> >ssqlCheckBox = "INSERT INTO
        >> >Survey_User_An swer(Survey_Id, Question_Id,Ans wer_Id,Date_Ans wer,User_ID)
        >> >VALUES (" & SurveyID & ",'" & objRS("Question _Id") & "' , '" &
        >> >answerChoices( answerChoice) & "' , to_char('&sysda te&', 'dd/mm/yy
        >> >hh24:mi:ss') , 'userrequested' )"[/color]
        >>
        >>
        >> The best way I have found to debug concatenated strings ( especially those with single and double quotes) is to use a
        >> Response.Write, so instead of sending your
        >> statement to Oracle, do a
        >>
        >> Response.Write( ssqlCheckBox)
        >> assume :
        >> Survey_ID=Meant est
        >> objRS("Question _ID") =23
        >> answerChoices(a nswerChoice) = Yes
        >> user =JVG
        >> then it will need to end up ( somehow) like this:
        >>
        >> Insert into Survey_User_Ans wer(Survey_Id,Q uestion_Id,Answ er_Id,Date_Answ er,User_ID)
        >> VALUES ('Meantest','23 ','Yes',To_char (sysdate,'dd/mm/yy hh24:mi:ss'),'J VG' )[/color][/color]

        Hi..
        Please do not top-post..it makes it difficult to follow the thread..


        You MUST use the to_date Function with the correct mask , not the raw result on NOW() for the database -
        like: to_date(Now(),' dd/mm/yyyy hh24:mi:ss AM').

        Doing this wil result it a insert statement something like this:

        INSERT INTO
        Survey_User_Ans wer(Survey_Id,Q uestion_Id,Answ er_Id,Date_Answ er,User_Id)
        VALUES (1,'1', 'e', to_date('16/06/2006 11:09:20 AM','dd/mm/yyyy hh24:mi:ss AM') )




        Comment

        • Turkbear

          #5
          Re: Oracle and asp.....still cannot figure this out. - More info

          On Fri, 16 Jun 2006 10:48:51 -0500, Turkbear <noone@nowhere. com> wrote:
          [color=blue]
          >On 16 Jun 2006 08:10:27 -0700, clinttoris@hotm ail.com wrote:
          >[color=green]
          >>Hello Turkbear,
          >>
          >>This was an excellent suggestion as now I have the insert statement
          >>that I need to be processed into the database. However, now I am
          >>confused as to why it is not inserting. Once I try and actually insert
          >>this into the database I get this error
          >>Error Type:
          >>Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
          >>[Oracle][ODBC][Ora]ORA-01843: not a valid month
          >>/itsurvey/testSubmission. asp, line 72
          >>
          >>Any ideas?
          >>
          >>Here is the insert string
          >>INSERT INTO
          >>Survey_User_A nswer(Survey_Id ,Question_Id,An swer_Id,Date_An swer,User_Id)
          >>VALUES (1,'1', 'e', '16/06/2006 11:09:20 AM')
          >>
          >>I have used the function Now() for datetime.
          >>
          >>
          >>Thanks again
          >>
          >>
          >>Turkbear wrote:[color=darkred]
          >>> On 15 Jun 2006 12:00:36 -0700, clinttoris@hotm ail.com wrote:
          >>>
          >>> >Could some please finish this line of code. For the life of me
          >>> >whatever I try it does not work.
          >>> >
          >>> >I am trying to insert the current date time into oracle. Now I know
          >>> >that in oracle if I run
          >>> >
          >>> >select to_char(sysdate , 'dd/mm/yy hh24:mi:ss') from dual
          >>> >
          >>> >result would be 15/06/06 14:49:35
          >>> >
          >>> >Now I want to insert this syntax into my asp code so what I have done
          >>> >is created a variable and in my insert statement called the variable.
          >>> >Still does not work
          >>> >
          >>> >testing = to_char(sysdate , 'dd/mm/yy hh24:mi:ss')
          >>> >ssqlCheckBox = "INSERT INTO
          >>> >Survey_User_An swer(Survey_Id, Question_Id,Ans wer_Id,Date_Ans wer,User_ID)
          >>> >VALUES (" & SurveyID & ",'" & objRS("Question _Id") & "' , '" &
          >>> >answerChoices( answerChoice) & "' , "& testing & ", 'user')"
          >>> >
          >>> >Also, I would like to insert into my insert statement but have no idea
          >>> >Dim userrequested
          >>> >userrequeste d = Request.ServerV ariables("LOGON _USER")
          >>> >
          >>> >ssqlCheckBox = "INSERT INTO
          >>> >Survey_User_An swer(Survey_Id, Question_Id,Ans wer_Id,Date_Ans wer,User_ID)
          >>> >VALUES (" & SurveyID & ",'" & objRS("Question _Id") & "' , '" &
          >>> >answerChoices( answerChoice) & "' , to_char('&sysda te&', 'dd/mm/yy
          >>> >hh24:mi:ss') , 'userrequested' )"
          >>>
          >>>
          >>> The best way I have found to debug concatenated strings ( especially those with single and double quotes) is to use a
          >>> Response.Write, so instead of sending your
          >>> statement to Oracle, do a
          >>>
          >>> Response.Write( ssqlCheckBox)
          >>> assume :
          >>> Survey_ID=Meant est
          >>> objRS("Question _ID") =23
          >>> answerChoices(a nswerChoice) = Yes
          >>> user =JVG
          >>> then it will need to end up ( somehow) like this:
          >>>
          >>> Insert into Survey_User_Ans wer(Survey_Id,Q uestion_Id,Answ er_Id,Date_Answ er,User_ID)
          >>> VALUES ('Meantest','23 ','Yes',To_char (sysdate,'dd/mm/yy hh24:mi:ss'),'J VG' )[/color][/color]
          >
          >Hi..
          >Please do not top-post..it makes it difficult to follow the thread..
          >
          >
          >You MUST use the to_date Function with the correct mask , not the raw result on NOW() for the database -
          > like: to_date(Now(),' dd/mm/yyyy hh24:mi:ss AM').
          >
          >Doing this wil result it a insert statement something like this:
          >
          >INSERT INTO
          >Survey_User_An swer(Survey_Id, Question_Id,Ans wer_Id,Date_Ans wer,User_Id)
          >VALUES (1,'1', 'e', to_date('16/06/2006 11:09:20 AM','dd/mm/yyyy hh24:mi:ss AM') )
          >
          >
          >[/color]
          to further clarify the code needed, be sure to concatenate the Now() with the Sql string accurately..

          Something like

          to_date(" & Now() & ",'dd/mm/yyyy hh24:mi:ss AM') )"


          Comment

          • Bob Barrows [MVP]

            #6
            Re: Oracle and asp.....still cannot figure this out. - More info

            Turkbear wrote:

            Please do some snipping instead of making us scroll through all the
            irrelevant previous replies.

            --
            Microsoft MVP - ASP/ASP.NET
            Please reply to the newsgroup. This email account is my spam trap so I
            don't check it very often. If you must reply off-line, then remove the
            "NO SPAM"


            Comment

            • clinttoris@hotmail.com

              #7
              Re: Oracle and asp.....still cannot figure this out.


              Turkbear wrote:[color=blue]
              > On 16 Jun 2006 08:10:27 -0700, clinttoris@hotm ail.com wrote:
              >[color=green]
              > >Hello Turkbear,
              > >
              > >This was an excellent suggestion as now I have the insert statement
              > >that I need to be processed into the database. However, now I am
              > >confused as to why it is not inserting. Once I try and actually insert
              > >this into the database I get this error
              > >Error Type:
              > >Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
              > >[Oracle][ODBC][Ora]ORA-01843: not a valid month
              > >/itsurvey/testSubmission. asp, line 72
              > >
              > >Any ideas?
              > >
              > >Here is the insert string
              > >INSERT INTO
              > >Survey_User_An swer(Survey_Id, Question_Id,Ans wer_Id,Date_Ans wer,User_Id)
              > >VALUES (1,'1', 'e', '16/06/2006 11:09:20 AM')
              > >
              > >I have used the function Now() for datetime.
              > >
              > >
              > >Thanks again
              > >
              > >
              > >Turkbear wrote:[color=darkred]
              > >> On 15 Jun 2006 12:00:36 -0700, clinttoris@hotm ail.com wrote:
              > >>
              > >> >Could some please finish this line of code. For the life of me
              > >> >whatever I try it does not work.
              > >> >
              > >> >I am trying to insert the current date time into oracle. Now I know
              > >> >that in oracle if I run
              > >> >
              > >> >select to_char(sysdate , 'dd/mm/yy hh24:mi:ss') from dual
              > >> >
              > >> >result would be 15/06/06 14:49:35
              > >> >
              > >> >Now I want to insert this syntax into my asp code so what I have done
              > >> >is created a variable and in my insert statement called the variable.
              > >> >Still does not work
              > >> >
              > >> >testing = to_char(sysdate , 'dd/mm/yy hh24:mi:ss')
              > >> >ssqlCheckBox = "INSERT INTO
              > >> >Survey_User_An swer(Survey_Id, Question_Id,Ans wer_Id,Date_Ans wer,User_ID)
              > >> >VALUES (" & SurveyID & ",'" & objRS("Question _Id") & "' , '" &
              > >> >answerChoices( answerChoice) & "' , "& testing & ", 'user')"
              > >> >
              > >> >Also, I would like to insert into my insert statement but have no idea
              > >> >Dim userrequested
              > >> >userrequeste d = Request.ServerV ariables("LOGON _USER")
              > >> >
              > >> >ssqlCheckBox = "INSERT INTO
              > >> >Survey_User_An swer(Survey_Id, Question_Id,Ans wer_Id,Date_Ans wer,User_ID)
              > >> >VALUES (" & SurveyID & ",'" & objRS("Question _Id") & "' , '" &
              > >> >answerChoices( answerChoice) & "' , to_char('&sysda te&', 'dd/mm/yy
              > >> >hh24:mi:ss') , 'userrequested' )"
              > >>
              > >>
              > >> The best way I have found to debug concatenated strings ( especially those with single and double quotes) is to use a
              > >> Response.Write, so instead of sending your
              > >> statement to Oracle, do a
              > >>
              > >> Response.Write( ssqlCheckBox)
              > >> assume :
              > >> Survey_ID=Meant est
              > >> objRS("Question _ID") =23
              > >> answerChoices(a nswerChoice) = Yes
              > >> user =JVG
              > >> then it will need to end up ( somehow) like this:
              > >>
              > >> Insert into Survey_User_Ans wer(Survey_Id,Q uestion_Id,Answ er_Id,Date_Answ er,User_ID)
              > >> VALUES ('Meantest','23 ','Yes',To_char (sysdate,'dd/mm/yy hh24:mi:ss'),'J VG' )[/color][/color]
              >
              > Hi..
              > Please do not top-post..it makes it difficult to follow the thread..
              >
              >
              > You MUST use the to_date Function with the correct mask , not the raw result on NOW() for the database -
              > like: to_date(Now(),' dd/mm/yyyy hh24:mi:ss AM').
              >
              > Doing this wil result it a insert statement something like this:
              >
              > INSERT INTO
              > Survey_User_Ans wer(Survey_Id,Q uestion_Id,Answ er_Id,Date_Answ er,User_Id)
              > VALUES (1,'1', 'e', to_date('16/06/2006 11:09:20 AM','dd/mm/yyyy hh24:mi:ss AM') )[/color]



              Hi Turkbear,

              Sorry about Top posting. I hope I understood you correctly. If not
              please indicate waht top posting is. I took it to mean that I posted
              my message at the top of the text as opposed to the end. If I am
              mistaken please explain.

              Thanks for the suggestion. It does insert into the database however
              the time is not showing in the database. I still only get the date.
              Any other suggestions.
              here is the insert statement

              ssqlCheckBox = "INSERT INTO
              Survey_User_Ans wer(Survey_Id,Q uestion_Id,Answ er_Id,Date_Answ er) VALUES
              (" & SurveyID & ",'" & objRS("Question _Id") & "', '" &
              answerChoices(a nswerChoice) & "', to_date('" & Now() & "','dd/mm/yyyy
              hh:mi:ss PM'))"

              Comment

              • Pedro Leite

                #8
                Re: Oracle and asp.....still cannot figure this out.

                hi

                just a thought but cant you make the default value on the table set to
                system date ?
                most likely you have tried it but sometimes we miss the simple solution.
                don't even know if is possible in oracle.

                hth

                Pedro Leite
                -----------------------------------------------


                Comment

                • Turkbear

                  #9
                  Re: Oracle and asp.....still cannot figure this out.

                  On 16 Jun 2006 09:19:27 -0700, clinttoris@hotm ail.com wrote:
                  [color=blue]
                  >
                  >Turkbear wrote:[color=green]
                  >> On 16 Jun 2006 08:10:27 -0700, clinttoris@hotm ail.com wrote:[/color][/color]
                  [color=blue]
                  >Hi Turkbear,
                  >
                  >Sorry about Top posting. I hope I understood you correctly. If not
                  >please indicate waht top posting is. I took it to mean that I posted
                  >my message at the top of the text as opposed to the end. If I am
                  >mistaken please explain.
                  >
                  >Thanks for the suggestion. It does insert into the database however
                  >the time is not showing in the database. I still only get the date.
                  >Any other suggestions.
                  >here is the insert statement
                  >
                  >ssqlCheckBox = "INSERT INTO
                  >Survey_User_An swer(Survey_Id, Question_Id,Ans wer_Id,Date_Ans wer) VALUES
                  >(" & SurveyID & ",'" & objRS("Question _Id") & "', '" &
                  >answerChoices( answerChoice) & "', to_date('" & Now() & "','dd/mm/yyyy
                  >hh:mi:ss PM'))"[/color]

                  That was correct...Oracl e, by default, will not show the date and time unless you specifically request both ..

                  Select to_char(datetim efield,'dd/mm/yyyy hh24:mi:ss AM') from table...

                  To get Just date, but in that format omit the time mask ( the hh24:mi:ss AM part)
                  To get just the time , use ONLY that part.


                  It is the 'reverse' of the to_date function..

                  Oracle , by default, shows dates as DD-MON-YY ( the exact format depends on your NLS_ parameters)



                  Comment

                  • Turkbear

                    #10
                    Re: Oracle and asp.....still cannot figure this out.

                    On Fri, 16 Jun 2006 17:28:35 +0100, "Pedro Leite" <naoehpreciso > wrote:
                    [color=blue]
                    >hi
                    >
                    >just a thought but cant you make the default value on the table set to
                    >system date ?
                    >most likely you have tried it but sometimes we miss the simple solution.
                    >don't even know if is possible in oracle.
                    >
                    >hth
                    >
                    >Pedro Leite
                    >-----------------------------------------------
                    >[/color]

                    Yes, you can use a

                    'Alter table table_name modify column_name defgalt SYSDATE;'

                    Sql statement so that all future inserts that do not specify a date will insert the current sysdate value.

                    Good catch...



                    Comment

                    • Turkbear

                      #11
                      Re: Oracle and asp.....still cannot figure this out. - More info

                      On Fri, 16 Jun 2006 12:05:36 -0400, "Bob Barrows [MVP]" <reb01501@NOyah oo.SPAMcom> wrote:
                      [color=blue]
                      >Turkbear wrote:
                      >
                      >Please do some snipping instead of making us scroll through all the
                      >irrelevant previous replies.[/color]


                      Sorry about that..but some folks also complain when the 'trail' of thread has been lost..


                      Comment

                      • Bob Barrows [MVP]

                        #12
                        Re: Oracle and asp.....still cannot figure this out. - More info

                        Turkbear wrote:[color=blue]
                        > On Fri, 16 Jun 2006 12:05:36 -0400, "Bob Barrows [MVP]"
                        > <reb01501@NOyah oo.SPAMcom> wrote:
                        >[color=green]
                        >> Turkbear wrote:
                        >>
                        >> Please do some snipping instead of making us scroll through all the
                        >> irrelevant previous replies.[/color]
                        >
                        >
                        > Sorry about that..but some folks also complain when the 'trail' of
                        > thread has been lost..[/color]

                        I did not say to snip it all: just snip the stuff that is irrelevant to the
                        reply you are making. Leave just enough that we see the context for your
                        reply.

                        Yes, this is sometimes a hard judgement to make. But in general it is better
                        to err on the snip-too-much side rather than the snip-not-enough side.

                        That said (Eugene), one should always quote just enough of the post to which
                        you are replying to provide context for your readers.
                        --
                        Microsoft MVP - ASP/ASP.NET
                        Please reply to the newsgroup. This email account is my spam trap so I
                        don't check it very often. If you must reply off-line, then remove the
                        "NO SPAM"


                        Comment

                        • clinttoris@hotmail.com

                          #13
                          Re: Oracle and asp.....still cannot figure this out.


                          Turkbear wrote:[color=blue]
                          > On 16 Jun 2006 09:19:27 -0700, clinttoris@hotm ail.com wrote:
                          >[color=green]
                          > >
                          > >Turkbear wrote:[color=darkred]
                          > >> On 16 Jun 2006 08:10:27 -0700, clinttoris@hotm ail.com wrote:[/color][/color]
                          >[color=green]
                          > >Hi Turkbear,
                          > >
                          > >Sorry about Top posting. I hope I understood you correctly. If not
                          > >please indicate waht top posting is. I took it to mean that I posted
                          > >my message at the top of the text as opposed to the end. If I am
                          > >mistaken please explain.
                          > >
                          > >Thanks for the suggestion. It does insert into the database however
                          > >the time is not showing in the database. I still only get the date.
                          > >Any other suggestions.
                          > >here is the insert statement
                          > >
                          > >ssqlCheckBox = "INSERT INTO
                          > >Survey_User_An swer(Survey_Id, Question_Id,Ans wer_Id,Date_Ans wer) VALUES
                          > >(" & SurveyID & ",'" & objRS("Question _Id") & "', '" &
                          > >answerChoices( answerChoice) & "', to_date('" & Now() & "','dd/mm/yyyy
                          > >hh:mi:ss PM'))"[/color]
                          >
                          > That was correct...Oracl e, by default, will not show the date and time unless you specifically request both ..
                          >
                          > Select to_char(datetim efield,'dd/mm/yyyy hh24:mi:ss AM') from table...
                          >
                          > To get Just date, but in that format omit the time mask ( the hh24:mi:ss AM part)
                          > To get just the time , use ONLY that part.
                          >
                          >
                          > It is the 'reverse' of the to_date function..
                          >
                          > Oracle , by default, shows dates as DD-MON-YY ( the exact format depends on your NLS_ parameters)[/color]



                          Hmmm, I'm confused on the last statement made only because I have
                          specified both date and time and it is still only submitting date.
                          Here is the code

                          to_char('" & Now() & "','dd/mm/yyyy hh24:mi:ss PM') Any other ideas?

                          Comment

                          • Turkbear

                            #14
                            Re: Oracle and asp.....still cannot figure this out.

                            On 19 Jun 2006 05:26:43 -0700, clinttoris@hotm ail.com wrote:
                            [color=blue]
                            >[/color]
                            [color=blue]
                            >
                            >
                            >
                            >Hmmm, I'm confused on the last statement made only because I have
                            >specified both date and time and it is still only submitting date.
                            >Here is the code
                            >
                            >to_char('" & Now() & "','dd/mm/yyyy hh24:mi:ss PM') Any other ideas?[/color]

                            Please post the actual output from
                            Response.Write( ssqlCheckBox )...

                            And from

                            Response.Write( Now())

                            You maty have to assign the output of the Now() function to a variable an duse that in the concatenation:

                            Dim cdandt = Now();
                            to_date('" & cdandt & "','dd/mm/yyyy hh24:mi:ss PM') ( Remember : To_Date when INSERTING, To_Char when retreiving..)


                            Comment

                            • Pedro Leite

                              #15
                              Re: Oracle and asp.....still cannot figure this out.

                              I REMEMBER

                              had this trouble before on an MS Product.

                              it was a month thing

                              English --> Portuguese

                              JAN --> JAN
                              FEV --> FEV
                              MAR --> MAR
                              APR --> ABR **
                              JUN --> JUN
                              JUL --> JUL
                              AUG --> AGO **
                              SEP --> SET
                              OCT --> OUT **
                              NOV --> NOV
                              DEC --> DEZ **

                              some months were ok, some not, and it was the literal form, ie, trying to
                              insert ABR when shoule be APR.

                              Locale was the man.

                              hth

                              Pedro Leite From Portugal.
                              ------------------------------------------------------------
                              "Turkbear" <noone@nowhere. com> escreveu na mensagem
                              news:pbdd921t1q 13d1m3dpjli96p2 gvnclg7jg@4ax.c om...[color=blue]
                              > On 19 Jun 2006 05:26:43 -0700, clinttoris@hotm ail.com wrote:
                              >[color=green]
                              >>[/color]
                              >[color=green]
                              >>
                              >>
                              >>
                              >>Hmmm, I'm confused on the last statement made only because I have
                              >>specified both date and time and it is still only submitting date.
                              >>Here is the code
                              >>
                              >>to_char('" & Now() & "','dd/mm/yyyy hh24:mi:ss PM') Any other ideas?[/color]
                              >
                              > Please post the actual output from
                              > Response.Write( ssqlCheckBox )...
                              >
                              > And from
                              >
                              > Response.Write( Now())
                              >
                              > You maty have to assign the output of the Now() function to a variable an
                              > duse that in the concatenation:
                              >
                              > Dim cdandt = Now();
                              > to_date('" & cdandt & "','dd/mm/yyyy hh24:mi:ss PM') ( Remember :
                              > To_Date when INSERTING, To_Char when retreiving..)
                              >
                              >[/color]


                              Comment

                              Working...