I have an ASP function in place to strip invalid chars out of a data store
before I create an XML file of this data, but my function doesn't work on a
certain set of chars.
As far as I can see these are the following:
a) trademark char
b) long hyphen/dash char
c) smart/curly quotes (both left and right)
Even though my function is set up as follows: Code:
i know, this shouldnt be a conundrum right? one just shouldnt divide by zero. but this is suddenly happening *all over* my site. after chasing the error here and there, i simplified things down to:
response.write cstr(4/2) response.end
and i STILL get the error: Microsoft VBScript runtime error '800a000b' Division by zero [followed by the line on which the error occurs]
so i know it's not my code. how can you get a division by zero error when you'r dividing with CONSTANTS??? did i change some obscure setting or something?now mind you, i tried "response.write cstr(4+2)" and the system managed to output "6".
I work as a contrctor for a foortune 500 company, who refuses to install SP1 or any subsequent SP. As a result the Excel reports I generate via ASP are not rendering properly. there's actually several different manifestations. My question is does anyone know what was fixed in SR1 (YES sR1, service release.
how I can "fix" the reports without requiring the whole company to install SP3? which I believe is included in SP3)regarding excel? ALso they have one app that successfully generates the excel reports, but it is in .NET and I can't get the source code.
My database (.mdb) has a 255 lenght text field, I need to insert the content of a request.form of not a text field, but a TEXTAREA:
---code--- <textarea name="comentario" rows="10" cols="50" wrap="PHYSICAL"> --end-code- how can I limit the textarea to a max number of characters, like 255? I think I should use any ASP code and a "there is an error" page, but I dont wonder how to made the sintaxis.
I know we have this thread somewhere, but I can't seem to find it now
I want to show the first 100 chars of a string, but I don't want a word to be cut in half at the end, it must show the whole word then and go a bit beyond 100 chars.
This will be used for a comments system, comments will be displayed on the front page, and I want the field (Comment) to only display the first 300 or so chars
I am having a probem with asp, xml, com while using chinese chars. The chinese letters come out of com fine and they are also fine when i use asp to write to a text file. When i load the chinese chars into an xml dom they become invalid Chinese chars show as this æˆ'çš,,模æ?¿. but when i doa xsl translation then some of the chinese chars are displayed and some are shown as garbage chars. My ASP Page has the following headers
Part of the content of one of our web pages uses wingdings and Chr(239) through Chr(242) (which are little arrow outlines, though that's not really important.)
It worked just fine in Windows 2000 Server, but now under Server 2003 it seems that characters above 127 get converted somehow, and our code no longer produces the desired effect.
Does anyone know how to make it send our content without modification, or how to encode it in a way that it makes it out to the browser with the intended character value (as opposed to some thoroughly useless conversion to a 7 bit value)?
I have a form where the user enters a customer name, then clicks the submit button which then adds it to a database. This works absolutely fine untill the name has an apostrophe in it.
eg when the name entered is O'Hanlon and its submitted, I get this error.....
Microsoft JET Database Engine (0x80040E14) Syntax error (missing operator) in query expression ''O'Hanlon'
I have an application that let's the user enter text into a textbox and this data is collected on the server and stored in a database.
The page is multilingual and sets Response.Charset to the appropiate for the language, for example gb2312 for chinese etc. This made all texts on the page show up alright.
However, I did not change the codepage of the page so ASP encoded the post data sent to the server and I have got really ugly texts for certain languages.
I have had applications before doing the same thing where the page has been able to decode the posted characters again when redisplaying them, but in this case I haven't been able to get anything meaningful from them.
It seems to me that the encoded text depends on the charset used when entering the text, entering chinese characters when using iso-8859-1 gives me character codes like Ó’ which probably would be alright to convert but chinese text that has been entered in the gb2312 charset look like this Code:
I have an ASP page that loops through a SQL Server 2000 table, then downloads an Excel sheet the users can save, etc. Works fine, except, I see that in one particular "comments" field the Excel sheet returns a #VALUE! error in the cell when there is a large amount of text. I've looked through the MSKB, MSDN and many ng posts to see if there is a workaround or solution to this, inclduing looking at the xlWorksheet properties (I've tried 'xlWorksheet.Cells(iRow, 11).WrapText = True), played with Orientation, etc. But to no avail.
my problem is that i load an xml file (which displayed well in iexplorer standalone) with an asp file, and the page displays o instead of ő, u instead of ű, so my central european characters are changed. the xml well formed, and well encoded. i hope ;)
I have loads of text in russian chars that I need to put to a MySQL db (version is 3.23).
a) Is there some way to make MySQL db to accept russian chars? b) If not, there must be ready-to-use functions to convert the russian chars to HTML-entities?
The site is done with ASP & VbScript, but of course JScript/Perl script based function suits well too. I've tried searching with Google too but thin results
The problem is that a person uses kind of a CMS where he/she can type different language versions of certain phrases. In practise there is a textarea type of field for all languages where he/she types the russian text which is then saved to a MySQL database.
i have a SQL text field that has linebreaks in it, when i try to display the field in my java/asp script it doesn't work. so i'm thinking i need to replace my linebreaks with <Br>? is that what i need to do? Code:
I have set up a page specifically for printing, however, I would like to be able to choose certain items on the page that are to be ignored by the printer. For example, the web version of the page may have instructions on how to print, although the version that is printed off does not.
I have successfully taken over a number of variables from a .csv file and put them into an .asp page. Unfortunately the .csv file has all these variables enclosed in double quotes i.e "Hello" and appear this way on the .asp page. Is there anyway of removing the double quotes (") from the beginning and end of the variables? I have tried splitting the individual variables on the " with this sSeg2 = Split( var1, """ )
ive checked the text file for it to validate it for removal, if it returns true i need to remove the line and clear that line so new lines can be added in the future. how can i remove a spcified line from the file?
ive got a string where i woulld like to remove the last character it probably seems simple 2 u but i cant work it out can anyone tell me how to remove it.
How do I remove any ASP code from a variable? I've got a variable returning a value with loads of ASP coding inside it and I want to remove that ASP code from the variable (any <% %> tags and anything between it).
Does anyone know of a way where I can remove an attribute from a querystring? For example, say my URL is thispage.asp?view=all&filter=col1 is there a way I can request the querystring but remove the filter=col1 attribute?
I have a database which currently stores a series of urls that are displayed in a page. The title field contains the url and the title text. I use the code below to display the information.
I was wondering if there was a way of putting the url in a script instead of manually having to enter the html for each url for each record. The only field that needs to change is the "id" field.
I have a form that seems to add a comma to the end of the email address, ive looked all over the form for this random comma which i cannot find, the comma is definately there before i perform any sort of email error checks, however ive pretty much given up trying to find where its added, but i was wondering, is there something you can add which removes the last character of a field, before it gets entered into the database, something like a comma?
I'm running IIS on Win2K Advanced Server. My backend database on unix gets suspended each night for backup purposes. This causes problems for the middleware if users try to access the database during this time.
So I thought I'd redirect all requests for pages in my app to a page saying the site is offline temporarily (ten minutes) I'm trying to do this using VBScript, exposing the IIS architecture using
set iisobj = GetObject("IIS://localhost/W3svc/1/ROOT/apps")
where "apps" is the name of the virtual directory where my app resides. I redirect using
I need to remove a period from a string of data. I have a whole column of numbers that have a period distributed randomly in them, and I need a way to pull the period out. Unfortunatly, the period is not at a fixed interval from the start or from the end. Sometimes it's like this: 08307.33214
and sometimes it's like this: 66543354.2213
At any rate, I have a whole column of these in SQL Server 7.0 and need to use the number as is for some issues, but without the period for others.
Can someone please show me how to write a function that will remove the period no matter where it is located in the string?
I have a permission tracking app that I am working on, and I have made the insert page for it. I am having issues on how to prevent duplicates from getting entered.
Currently the interface for the app has a mixture of select boxes, list boxes and checkboxes. The form submits the page to processAIMR.asp and then does the inserting. I am using a loop to insert a new record for each checkbox checked or listbox entry selected. Code:
I have an array of lets say 10 items, I now want to remove an item, lets say from somewhere in the middle, based on one of the element values equalling a value I specify - is there a "clever" and "quick" way of doing this or, will I need to iterate through it looking for a match, and build another array where I dont find the match etc...