Collegue resolved this for me.
Its a known globalization issue with SQL Server and ASP.NET apparently.
on the insert into you need to add an N in front of each field you want to become Unicode.
so:
INSERT INTO ORDERS (OrderNo, DelName, Title) Values ('" & vOrderNo & "',, '" &...
Hi All,
I have created an INSERT INTO that adds russian text to one of my SQL databases, however, the russian text appears in the database as ??? where the actual characters should be.
I initially thought it was because my collation was incorrect as it was set to default for the database so I...
Hi Jim,
I changed my code to run your suggested code, still seems to submit the page inclusive of the file.
<%@ Page Language="VB" AutoEventWireup="True" %>
<%@ Import Namespace="System.IO" %>
<html>
<head>
<script runat="server">
Sub ValidateBtn_OnClick(sender As Object, e As...
Guess im getting confused, you said checking if the file is a .zip serverside would not upload the file to the server, but looking at my example it does, ignore the fact im checking for length, you could replace that with .zip and it would still submit the file to the server i believe.
Hi Jim,
Ok, I tried what you suggested to see if it worked, you can do the same by pasting the code below into a blank aspx page. If I attempt to check a 150mb file server side it will actually place the whole page into the servers memory before doing server side checking. If you did this a...
Hi Jim, thanks for your reply, where would I place that code for it to run before page submission, i have something similar on the submit button but alas thats server side checking?
To my eyes that looks like server side code, which would require you to submit the page (if its a big file the...
OK, i found the problem myself.
Basically the regular expression microsoft give you on their examples doesnt work correctly with the fileupload control.
In my case i used.
=".*(.zip|.ZIP)$"
This checks the last 4 characters are .zip or .ZIP, which works fine. If your worried about .exe.zip...
The strange thing is i have a 150mb test file im using, if i set the application level config file to 25mb, the server fails and i cant get a custom error to appear (using the asax file and the redirect, see below).
If however i increase the application level config file to 200mb, the upload...
Again, thank you for the reply ca8msm.
You mention the error if the size is too big, are you referring to the dns error you get when basically it stops responding, or can we generate a custom error if the size exceeds the config file paramter? If i could make a custom error it would be fine...
="(^([\w*\s*\d*\(*\)*\\*_*\-*]*)$|^((([a-zA-Z]:)|(\\{2}\w+)\$?)(\\(\w([\w*\s*\d*\(*\)*\\*_*\-*]*)))+(.zip|.ZIP))
Should be
="(|^((([a-zA-Z]:)|(\\{2}\w+)\$?)(\\(\w([\w*\s*\d*\(*\)*\\*_*\-*]*)))+(.zip|.ZIP))
Was messing about thinking it was my regex that was faulty.
Ahh yes, i just read that, thanks for the reply, however the aim is to allow uploads of 25mb.
I either want to set the .config file to 25mb so its not trying to upload massive files into memmory, or find a way to stop the user uploading files greater then this before it sends its response to...
While im here may as well ask my other question.
Using the FileUpload Function, If i exceed the size specified in the config file i get an nds error, now ive read alot of posts that recommend putting an error sub into the asax file, however any redirect(response.redirect server.redirect) ive...
Hi all, mostly i do VBA programming so this is somewhat new to me, ive set up a page with a fileupload control on it, however, my regularexpressionvalidator doesnt work correctly, after uploading the first zip file, the regularexpression error message doesnt clear itself, by using a...
This is partly guess work as i cant see your report in design view (my fault i know, i should have asked), but if you have your subreport inside your detail section on your report then what you are doing is displaying a duplicate set of info per detail section.
Your main report has 2 records...
I found it hard to understand what you mean, any chance you could post a link to a picture of the report your getting? and tell me what table is linked to the main report and what table is linked to the sub report.
Below is a section of code i added on a forms current event, you can add the same code to a button.
Private Sub Form_Current()
Me.mycontrol.ControlSource = "alternatecontrolsource"
End Sub
Reports are trickier as they are generally not friendly towards changing their data source on the fly. In...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.