Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Update my mdate

Reply
Thread Tools

Update my mdate

 
 
wildt
Guest
Posts: n/a
 
      07-15-2003
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
 
Reply With Quote
 
 
 
 
Manohar Kamath [MVP]
Guest
Posts: n/a
 
      07-15-2003
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) m...
> 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



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Update On The Windows Phone 7 Update Update Lawrence D'Oliveiro NZ Computing 2 02-25-2011 08:03 AM
[BUG?] (2) Update database using stored procedure and OleDbDataAdapter.Update joun ASP .Net 5 11-30-2004 06:51 PM
[BUG?] Update database using stored procedure and OleDbDataAdapter.Update joun ASP .Net 9 11-30-2004 04:57 AM
[Vb.net question] how to apply online update function into program (the effect just like Norton system work live update) chan ASP .Net 1 03-04-2004 02:58 PM
Datalist: update a datasource without using select/edit/update Hartmut Schroth ASP .Net 3 12-01-2003 09:54 AM



Advertisments