-
Add template and date format error
I have a template to add new records and update current records which was working beautifully until I tried to format the dates with the "DBEditDateFormat = "MM/dd/yyyy" command to remove the time.
When I include the format command I get a "Cast from string "" to type 'Date' is not valid" error when I try to add, but the update works fine with the same template. If I remove the template it works fine with the default template on both the add and the update function. Any idea why the add function will not work while the update function works with the same template and the date format command.
I also have "ty=textcalendar" on all the date fields for both the add and the update.
I've been stugling with this all morning and I cannot find any logic to it.
-
post a few lines of NWIND code if you can...
FK
-
Here goes, same error I get in my application
<script language="vb" runat="server">
Sub Page_Load(Source as Object, E as EventArgs)
Dim E61 As New Tornado.Z()
with E61
.dbUnit = 61
.dbSkin= "cappuccino"
.dbMode = "Grid"
.dbGridDisplayFlds = "0,1,2,3"
.dbDSN = "nwind"
.dbValidatorParams = "code=/tornado/Jars|entry=false"
.dbmemotextsize = 2048
.dbEditUpdateFlds = "fi=3|ty=textcalendar,1,2"
.dbEditAddFlds = "fi=3|ty=textcalendar,1,2"
.dbBookMark = "orders;0"
.dbNavigationItem ="top,bottom,next,prev,filter,reload,add,update,de lete"
.dbSQL = "Select * from orders"
.dbTextHolder = "Title=Victim services - Victim Maintenance"
.dbUserUpdateTemplate =server.mappath("/tornado/templates/orders.htm")
.dbUserAddTemplate =server.mappath("/tornado/templates/orders.htm")
.ASPdbNET()
End With
End Sub
</script>
Here is the template I used
[[UE::_FORM]]
Add
_Orders test
Date
[[UE:rderdate]]
Customer
[[UE::customerid]]
Employee
[[UE::EmployeeId]]
[[UE::_Nav]]
[[UE::_/FORM]]
-
1. Even w/o dbEditDateFormat the edit date has not time as dblongdate defaults to false.
2. I put in ->
.dbEditDateFormat = "MM/dd/yy"
and the correct format shows...
So I cannot duplicate this problem.
Please use the latest version to confirm this.
FK
-
The problem is not in displaying the date, the problem is that the "add" process does not work with the custom template, the "update" works fine but not the "add". The "add" produces the following error.
"Cast from string "" to type 'Date' is not valid", removing the custom template makes the "add" work fine.
-
Yes, confirmed and fixed...
-
Will you be providing a new DLL soon?
-
Patch release already send to support... after confirm will release.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|