Results 1 to 3 of 3

Thread: SGallego

  1. #1
    S Gallego Guest

    Default SGallego

    My Sub thisPage_onenter() works while I&#039;m in my PWS environment OK but, when transfering it (With Visual Int 6) to my Master server I get a Data Type mismatch. Why? What is different? Is it<BR>the IIS security that more aggressive than PWS. See the code below:<BR><BR>&#060;SCRIPT ID=serverEventHandlersVBS LANGUAGE=vbscript RUNAT=Server&#062;<BR>The following line works OK:<BR>If chkFull.getChecked() And chkInyard.getChecked() Then<BR> If isEmpty(txtYarddate.value) Then &#039; If Empty field<BR> txtYarddate.value = Date()<BR> End If<BR>End If<BR>The next 3 lines do not work. I get the Data Type mismatch runtime error.<BR>txtStored.value = DateDiff("d",txtYarddate.value,Date())<BR>txtDeadl ine.value =DateAdd"d",txtAllowed.value,txtYarddate.value)<BR >txtLeft.value = (txtAllowed.value - txtStored.value)<BR>&#060;/SCRIPT&#062;<BR><BR>txtStored is an Access Number field<BR>txtDeadline & txtYarddate are date fields.<BR><BR>Please help me.<BR><BR>Steve

  2. #2
    Join Date
    Dec 1969

    Default RE: LBerg

    You may try adding some explicit datatype conversion<BR><BR>txtStored.value = DateDiff("d",cdate(txtYarddate.value),Date()) <BR>txtDeadline.value = DateAdd("d",cint(txtAllowed.value),cdate(txtYardda te.value)) <BR>txtLeft.value = cint(txtAllowed.value) - cint(txtStored.value) <BR>

  3. #3
    SGallego Guest

    Default RE: LBerg

    I tried the 1st line for txtStored.value and got a runtime error &#039;8000a000d&#039; Type mismatch: &#039;cdate&#039; What the...?<BR>It was an excellent try!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts