CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 date function

Print topic Send  topic

Author Message
michael
Posted: 02/06/2002, 4:56 PM

I use ASP and MySQL. I have a table with 3 field in date (initial_date, review_date and close_date). When I initial a case, the initial date will be create with (=now()) function. On the second screen, the initial_date is a label, review_date is also a label, I follow some tips here to setup hind and label field for review_date and put before show event a fldreviewdate=fldreview_date. In the screen it did show the right date and time, but once I enter update it update the initial date field and no action on review date? Any one could give a hand on this.
Nicole
Posted: 02/07/2002, 2:10 AM

Michael,
initial_date field shouldn't be updated, so add it as Label field only. As for review_date add both Label and Hidden type fields to the form, but assign different names to them. In BeforeShow event out current date value to both variables:
fldreview_date = now()
fldreview_date1 = now()
michael
Posted: 02/07/2002, 11:14 AM

nicole,

I did follow the tips, however I still got the same problem, I even separate into two forms. By the ways, actually, there is two field got to do the action, except the date function, another is initial_person, review_person, and close_person. The review_person is updated without problem, I use fldreview_person=session("UserID") and fldreviewperson=fldreview_person. Is it impacted by connection string? I use asp with template.

any hints,
Nicole
Posted: 02/08/2002, 2:38 AM

Michael,
it seems to me there something simple is missed. Do you have any code in BeforeShow Update and BeforeUpdate events? It is executed right before record is updated and may be you have any code for review_date field there.
michael
Posted: 02/08/2002, 2:27 PM

I check there is no any event existed, then I review the code generate by codecharge, I only find

sSQL = "update car_main set " & _
"assign_to_i=" & ToSQL(fldassign_to_i, "Text") & _
",location_id2=" & ToSQL(fldlocation_id2, "Number") & _
",review_by=" & ToSQL(fldreview_by, "Number") & _
",review_date=" & ToSQL(fldreview_date, "Date") & _
",rejection=" & fldrejection & _
",instruction=" & ToSQL(fldinstruction, "Text")
sSQL = sSQL & " where " & sWhere

However, it doesn't update review_date, I have to put

' car_pendingreview2 AfterUpdate Event begin
if fldreview_by>0 then
fldreview_date = now()
end if
' car_pendingreview2 AfterUpdate Event end

to let it update review date

And the initial date should not be update is still keep under when I press update.

Any idea

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.