Update my mdate

Discussion in 'ASP General' started by wildt, Jul 15, 2003.

  1. wildt

    wildt Guest

    I'm trying to Update my mdate field (date/time) data type
    i broke the mdate into date (mm/dd/yyy) with name="MYdate"
    and time with name="Tdate"

    <select name="Tdate" >
    <option value="<%=rs("mdate")%>">
    <%=FormatDateTime(RS.Fields("mdate"),"3")%>

    <input type="text" name="MYdate" value="
    <%=FormatDateTime(RS.Fields("mdate"),"2")%>">



    SQLstmt = "UPDATE courses SET "

    SQLstmt = SQLstmt & "mdate='" & TRIM(Request.Form("MYdate")) & "', "'
    & " & TRIM(Request.Form("Tdate")) & "'"


    the update only works for "MYdate" the "Tdate"is remains the same
    it's probably has to do with the SQLstmt.
    Need help.
    Thanks
     
    wildt, Jul 15, 2003
    #1
    1. Advertising

  2. Write out the SQL statement to see what it looks like.

    Response.Write SQLStmt

    That way you can debug it much easily.

    --
    Manohar Kamath
    Editor, .netBooks
    www.dotnetbooks.com


    "wildt" <> wrote in message
    news:...
    > I'm trying to Update my mdate field (date/time) data type
    > i broke the mdate into date (mm/dd/yyy) with name="MYdate"
    > and time with name="Tdate"
    >
    > <select name="Tdate" >
    > <option value="<%=rs("mdate")%>">
    > <%=FormatDateTime(RS.Fields("mdate"),"3")%>
    >
    > <input type="text" name="MYdate" value="
    > <%=FormatDateTime(RS.Fields("mdate"),"2")%>">
    >
    >
    >
    > SQLstmt = "UPDATE courses SET "
    >
    > SQLstmt = SQLstmt & "mdate='" & TRIM(Request.Form("MYdate")) & "', "'
    > & " & TRIM(Request.Form("Tdate")) & "'"
    >
    >
    > the update only works for "MYdate" the "Tdate"is remains the same
    > it's probably has to do with the SQLstmt.
    > Need help.
    > Thanks
     
    Manohar Kamath [MVP], Jul 15, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Hartmut Schroth
    Replies:
    3
    Views:
    3,539
    Hartmut Schroth
    Dec 1, 2003
  2. joun
    Replies:
    9
    Views:
    2,278
    W.G. Ryan eMVP
    Nov 30, 2004
  3. joun
    Replies:
    5
    Views:
    2,705
  4. =?Utf-8?B?TWljaGFlbA==?=

    How to update datagrid after update

    =?Utf-8?B?TWljaGFlbA==?=, Mar 17, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    522
    Alex D.
    Mar 17, 2006
  5. mesut
    Replies:
    0
    Views:
    693
    mesut
    Feb 19, 2007
Loading...

Share This Page