PDA

View Full Version : Dig File Pro type mismatch error


russell298997
05-01-2009, 09:49 AM
Can anyone shed any light here before regards Dig File Pro error message.......

Pretty well every time i insert records using DataAssist it has been impossible to force a UK date format - either using <%Session.LCID=2057%> or switch function code recommended by WebAssist.

WebAssist support now concede that DataAssist can't insert the date in UK format (tho it has been known to do it correctly on some insert page, for some even more baffling reason) and say there is a bug and it may get fixed at some point in the future, but that's obviously not helping me now, knee deep in a project.

I have tried re-building a basic Dreamweaver Insert page and the date inserts fine. However I also need to use Dig File Pro to upload files WA engineer thought that should be fine) . Having added that, and changed all the "Request.Form" instances to "UploadFormRequest", I am left with the page falling over at the line using "If (CStr(UploadFormRequest("MM_insert")) = "form1") Then".

It brings up the same "can't call binary read" error message. If I change that instance of "Request" to "UploadFormRequest", I get an type mismatch error.


Can anyone shed any light on a way forward? I really have to be able to input dates in consistent UK format and be able to upload files from the same page. I'm not good enough write it all without extensions

Am I asking the technically impossible or does anyone know what needs to be changed in this code that's hanging.

Would be very grateful for any suggestions.

Ray Borduin
05-01-2009, 10:39 AM
Is the name of your upload object: UploadFormRequest?

It seems that may be the wrong value, but I'd have to look at your code to be sure.

russell298997
05-05-2009, 01:34 AM
Hi,
Further to previous post - here's the code as far as i got. appreciate any help you can give

Danilo Celic
05-05-2009, 07:13 AM
When you have an instance of Digital File Pro Upload on the page for an ASP page, you should see in the Bindings panel a set of bindings for your form. Each field within the form should be listed (except for the upload field). In this case the MM_insert field should be listed. If you drag that binding onto the page, then you should see the proper syntax to refer to the field value. For me with a text field it dropped:<%=WA_DFP_UploadObj.Form("textfield")%>

So, try:
If (CStr(WA_DFP_UploadObj.Form("MM_insert")) = "form1") Then

russell298997
05-05-2009, 08:57 AM
hi,

tried it - (file attached), and got;

Microsoft VBScript runtime (0x800A000D)
Type mismatch: 'UploadFormRequest'
/CityAcademy/admin/Events_Insert2.asp, line 55

any further thoughts?

Danilo Celic
05-05-2009, 10:30 AM
Yes, you'll still get that until you remove all the instances of UploadFormRequest, and replace them with the correct syntax to refer to the file filed values with an upload in place. Not quite sure where that came from, but if you inspect the DataAssist server behavior and reselect the fields from the data bindings you should be fine.

russell298997
05-05-2009, 10:55 AM
sorry, didnt realise all instances had to be replaced. done that and got the function working. great help - thanks.

the subsequent issue is all "update" pages since the same problem occurs, Data Assist rewrites the date to US format. would i follow the same principle i.e. recreate page using DW update behaviour, add Dig File Pro behaviour then change specific instances of code to something WA-relevant.

is there an equivalent instance to "WA_DFP_UploadObj.Form" to look out for in the update page that will need all instances changing...>?

Finally, someone (Ray Bourdoin?) did post that Validation Toolkit could solve the date format issue (which would be great cos then I dont have to pretty-well abandon DataAssist, or re-write half the pages it creates). D oyou know at all whether this might be possible (using ASP VB/Access). I can see how the validation might flag up the format being wrong, but is there really any way it could put it right....?

thanks again for any more help.

Danilo Celic
05-05-2009, 01:06 PM
Not sure what you mean by "DataAssist rewrites the date to US format", but given that this thread is in the DFP forum, that seems to me to be a topic for another thread. If Ray says that Validation Toolkit can solve the problem, then I'd trust him on that as he is very familiar with what it can do.

russell298997
05-05-2009, 02:14 PM
thanks - the dataassist reference came from the original post - thanks for your help, i'll wait to see what ray posts back. cheers