Deleting The First X Number Of Chars

I have a string

ASP Code:
Dim address
address = "C:Documents and Settingsob"

How do i delete the first 26 chars of so when i display this on screen it will only display bob and not C:Documents and Settingsob

View Replies


ADVERTISEMENT

Max Chars

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.

View Replies View Related

Show First 100 Chars

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.

View Replies View Related

Chars Of A Field

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

View Replies View Related

Chinese Chars In XML

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

<%@Language=VBScript CodePage="65001"%>

<%
Response.CharSet = "UTF-8"
Response.ContentType = "text/html"
%>

My XSL has the following header <?xml version="1.0" encoding="UTF-8"?> ..

View Replies View Related

Trying To Send 8 Bit Chars Under IIS6

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)?

View Replies View Related

Removing Obscure Chars

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:

View Replies View Related

Form Field Chars

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'

View Replies View Related

Inserting Illegal Chars To Sql Db?

We try to insert some illegal chars such as "I don't know how to do it" from notes textarea to the DB.

When I insert, it said that "Microsoft OLE DB Provider for SQL Server (0x80040E14) Line 1: Incorrect syntax near 't'." which is "Don't" .

I have tried this: notes= replace(replace(Request.Form("notes"),chr(13),"&nbsp;"),chr(10),"<BR>") But, NO LUCK. How can we make it works?

View Replies View Related

Counter To Track # Chars. Typed

I'd like to have a counter that tracks # of chars typed... so I don't risk having my message box truncated. Gonna be JS-based huh?

View Replies View Related

Encoded Chars From Form Post

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:

View Replies View Related

Splitting String Of Unicode Chars

i want to split a string containing unicode chars. If i use Split() funtion of ASP the unicode characters in string it gives wrong results..

Is there any other funtion or anyway through which i can split my unicode string to array?

HERE IS THE EXAMPLE FOR MY PROBLEM ------

i hav string in given form(sepated by a semi colon[;] )

ROOMS = Cap-Haitien;Gonaives;Jeremie;L’Artibonite;Grand-Gouave;

When i split this string using

Split(ROOMS, ";")

it gives me following results

Cap-Haitien
Gonaives
Jeremie
L’
Artibonite
Grand-Gouave

However it shud give me

Cap-Haitien
Gonaives
Jeremie
L’Artibonite
Grand-Gouave

Is there any solution to my problem?

View Replies View Related

ASP(xlWorksheet.Cells) W/many Text Chars Has #VALUE! Error In XL S

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.

View Replies View Related

Load Xml With Asp Lost Central European Chars

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 ;)

<?xml version="1.0" encoding="ISO-8859-2"?>
<tests>
<test>o</test>
<test>Å‘</test>
</tests>

View Replies View Related

How To Convert Russian Chars To HTML Entities?

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.

View Replies View Related

Convert Real Number Into Text Number

I need to insert some number into database as text. My problem is if I insert the number (ie. 4.0), the value in the database only show (4). So, is it possible to convert a real number into text number using ASP?

View Replies View Related

Sequential Number After Batch Number

here is the scenerio

in master batch table i have various master batch like
200701-0001
200701-0002
200701-0003

Now each master batch can have multiple final mixed batch like

200701-0001-01
200701-0001-02
200701-0001-03

and this record is inserted in to fmix table.

so i have a form in which i have a dropdown menu in which all the master batch is listed,
i select 200701-0001 and that value is passed to next page where i will enter other fields data and insertion to my fmix_no will be done automatic like 200701-0001-01, 200701-0001-02 and so on,

how to achieve this

so in short each master batch will have more than one final mixed batch.

pls help, also if u have any online contact in yahoo or msn pls send me, i am so confused and badly struck deadline is just couple of hours away. my yahoo id is(E-Mail address blocked: See forum rules) you can PM me i am online right now.

View Replies View Related

Retrieve The Error Number In VB With Err.Number

I want To handel the error messages by myself in one part in my script. I know that in VB I can Use the statment - On error resume next And I also know that I can retrive the Error Number In VB with Err.Number.

How can I handel the errors by myself in ASP? I heard about the ASPErr Object, Is it the same thing like the err object in VB?

View Replies View Related

Deleting

This code works fine, it deletes the record that already exist in the database and displays a message to the user the record has being deleted.... but it also it has a problem, if you enter a record to delete from the database and this record does not exist it displays the message that the record has being deleted, while instead it should display an error that this record does not exist in the database.

Code: ...

View Replies View Related

A Little Like Hotmail Deleting......

Ive run into a little trouble. I am sure all of you have used hotmail. Well you know when you select all items to delete, i would like to do something like that, however not delete, but update a field from no to yes.

I would like to add checkboxes to an asp table. So if the user selects say three items they then click on a button, say marked and for each item, it will go to the table and find each record in turn and update the corresponding field from a no to a yes.

Updating is no problem. The problem is, how do i add checkboxes to corresponding asp table. So that particular checkbox corresponds to that particular record. I don't know how to link them together.

Can someone help me out please?

View Replies View Related

Deleting A Page

I have a form that contains many pages. If someone clicks on delete, the application takes the user back to page 1 instead back on page in the breadcrumb trail. It is fine when the user is on page 2 but they could be on page 10 and click delete and then they are back to page one. I want to have the application go back on page at a time each time they click on delete. Here is what I have for code:

If LEN(page & " ")=0 Then
page = 1
End If
page = CInt(page)
If i = page Then
response.write "<font color=""#CC0000""><strong>[page " & cstr(i) & "]</strong></font> "

View Replies View Related

Deleting Folder

I have a script which allows a user to upload and delete files from the
server.Is it possible (and if so how) to do a check to see if the folder is empty
(ie if the last file in a particular folder is deleted by a user) and if it
is empty, delete the folder?

View Replies View Related

Deleting Record

I'm having trouble creating a one record recordset then deleting it. I've never done this before. The code below returns: "Type mismatch: objRS".

Code:

View Replies View Related

Deleting A File

On my webpage users can upload files and also delete those files. Everything seems to work, but when they upload a file that contains spaces, I am having problems getting the file deleted, for example: "This is my file.txt"

Is there a way I can delete this file. I have tried to take out the spaces, but the file still doesn't delete:
<%=Replace(Request("MyFile")," ","+")%>

View Replies View Related

Error In Deleting

this is my code but when i delete all the record there is error dispalyed ?

elseif (strType = "Delete") then
strSQLDelete= " Delete From events where id = " + ID
conn.execute strSQLDelete
response.redirect "eventform.asp"

View Replies View Related

Deleting Cookies

I am using cookies to store the user name and login state on the site. I am having some problems logging people out.

Firstly wanted to make the cookie values null but having some trouble with that

Response.Cookies("Login")("UserGood") = ""
Response.Cookies("Login")("Usercode") = ""

doesn't appear to do anything?

What would be really cool would be to delete to cookie in the logout script, can that be done from ASP?????

View Replies View Related

Deleting A File Using ASP

I have a little app running in ASP which lists a bunch of files that are in a directory. This is attained using the following code:

View Replies View Related

Deleting Thumbnails

I'm trying to delete 2 files using fso. The mail file name is stored in an
access db.

using the code below I can delete the main file but not the thumbnail.

The thumbnail has the same file name plus the suffix "_small" so if the main
file is called "mypicture.jpg" the thumbnail is called "mypicture_small.jpg"

The main file is being deleted but no matter how I try I cannot get the
thumbnail deleted. They are both in the same folder with the same permissions.

Code:

View Replies View Related

Deleting Cookie

I'd like to have a remove all button in my shopping cart.

is it possible to delete a cookie with asp?

View Replies View Related

Deleting Records

I am using ASP with SQL for my database.The problem I have is that even after I have ordered certain items from the shopping cart table on the webpage, I cannot remove them -
that is the entire list shows up the next time the table is opened.

is there any way I can delete the items once ordered so as to not let them show in my table?

View Replies View Related

Deleting Files

How can I delete the files using ASP?Following is th code :

var objFso = Server.CreateObject("Scripting.FileSystemObject")
var strFileName = Server.MapPath(".") + ""+ "SubmittedDoc.xml"
if (objFso.FileExists(strFileName))
objFso.DeleteFile(strFileName)

This is not working.

View Replies View Related

DELETING EXCELL

i cant delete data from excell which i use as a database with asp.i encounter an error report about isam. how can i delete data from excell

View Replies View Related

Keep From Deleting A Record

i have a site that has several joins. I need a function that will go out to see if the master table is using a value from a dependant table before it allows the value in the dependant table to be deleted. nothing more than that.it could be a a simple js function that basically does?

rs = recordset

if count(rs) = 0 then delete field
else
if count(rs) is > 0 then "You can't delete this record"

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved