Trim All Characters After The First "

I need to do is remove ALL characters after and inc the characters "." found in a variable. i have a variable which holds device with DNS name such as E096064-FWSM2.netdevice.companyname.com

i want the variable to just hold the name E096064-FWSM2 the extension after the first "." can very greatly so i can not specify all possible options as i just do not know what they are going to be.

View Replies


ADVERTISEMENT

ASP Trim()

i'm having some trouble with the trim function. I have a date 04/18/1982. I want enter the value 1982-04 into the database. The code i'm using is:

strEXPDT = replace(right(left(request.form("Expiration_Date")2)4),"'","''")

View Replies View Related

Trim

I am constantly in need of help, I am back again. I am slowly, slowly getting my page to work. Here is the latest of my queries. I want to automatically make a username by trimming the first character of the first name and taking the entire last name, and putting it in strUserName, I am a little iffy about TRIM (what else is new) rofl. Anyway the user name I want to take the first 3 characters from postal/zip code and the first three numbers from phone number and make the password. Here is what I am thinking of course it doesn't work. BIG SURPRISE!!!

strUserId = Trim(RS("FName"),1) & RS("LName")
strPassword = Trim(RS("PCode"),3) & Trim(RS("Phone"),3)

View Replies View Related

Trim Numbers

I am converting bites to Megabytes in an operation. How would I trim the result to only go to 2 decimal places?ex:

Response.Write(file.FileName & " (" & (file.Size/1048576) & "Mb)<BR>")

View Replies View Related

Using Replace And Trim Together

This should not be this tough but I may be thinking too hard about it.
Here's what I have:

thenames="charles,sam,chris,"

How do I do remove the last comma? I tried using trim and replace
together but couldn't get it.

View Replies View Related

ASP Trim Function?

I'm creating a website that will have a page that lists current news
items. The news items will be stored in a SQL Server database and will
have basically two fields, the date and the news blurb . . . On the
main page of the site, I want to have a box that shows "Current News"
and only pulls the first 7 or so words from the news blurb followed by
a ... [more] where [more] is a link to the current news page.

For example, the database entry may be something like this: Code:

View Replies View Related

Trim String

How do i cut the last 4 characters in a string?
I know how to cut the 4 first, but i need to cut the last!
I have a image name like testimage.gif and I want to cut away .

View Replies View Related

Trim Leading

I have a textarea, that when you insert your cursor into it anywhere except for in the very first line, the cursor falls into the second line. When the form is submitted there is a carriage return at the beginning of the text that I'm having trouble getting rid of.

I tried to Trim() the string both before inserting it into the database and when writing it to the page, but apparently that doesn't strip off carriage returns (even though I've read it does.)

View Replies View Related

ASP Trim Function

i need to use the trim function trim("str","?"). How do i remove the "return sign" from a string?

View Replies View Related

Trim Text

how to use ltrim, rtrim to trim the beginning and end of text entries for extra spaces. I was wondering if there is a way to trim extra spaces from WITHIN a text entry.

Example:

change
John and Linda
to
John and Linda

View Replies View Related

Trim Function

I need to select records from table where right part of Field1 = strTest

the table looks like:

Field 1 Field2 Field3
5159-10 2 3
5159-20 6 9
LS5598-20 8 9

strTest=5159 or LS5598 doesn't matter

should be something like "select Field1 from tabTest where " & Right(Field1, 3) & " like " & strTest & "

Obviously I'm wrong somewhere, could anyone tell me where?

View Replies View Related

Trim Whitespace

does anyone know if it's possible to crop whitespace regions from around the edges of an image using Imagemagick?

I have a whole bunch of signature images (as in, people's handwritten signatures) and I'd like to crop them so that there's no whitespace margin around them. I can do the cropping fine, it's just detecting the color regions.

View Replies View Related

Trim Return Caracter

I make a csv file with values from data base fields . If my value contains a carriage return caracter at the end, a new line is created in my csv file. I tried to replace chr(13) caracter by an empty caracter but it doesn't work, my code is:

Replace(Trim(element.value), chr(13),"")

Do you have any idea to resolve my problem?

View Replies View Related

Trim() Doesn't Work

I cannot figure out why this won't work, but I cannot get the trim() function to work for me. I tried this test code just to see if I could get anything:Code:

<%
String = "This is a string"
response.write String & "<br>"
Trimmed = Trim(String)
response.write Trimmed

And the results are both the same.This is a string.
Can anyone think of any good reason the Trim statement wouldn't be working I cannot think of any other common ASP function that isn't working for me.

View Replies View Related

Trim Request.Form

its ok to use just

Trim(Request.Form("txtFromName"))

or to use both
rTrim(ltrim(Request.Form("txtFromName")))

View Replies View Related

Trim String And Indexing Server

Ok, I have this code:

For i = startCt To endCt
' Get the document title. If it's blank, set it to "Untitled".
Dim docTitle,path,desc
Dim tObj
Set tObj = results1(i)
docTitle = tObj("title")
path = tObj("vpath")
desc = tObj("desc")
.......

Now, results1 comes from the ms indexing server.

Problem with some of the results is the title is an empty string, so no link.

If I query the catalog in comp mgnmt, no problems.

So, indexing problem or something else.

I can use the path and get the doc name there if empty.

Also, does asp have a string.trim like .net? ....

View Replies View Related

Get First 50 Characters

Anyone in here got an idea how i could limit the display on on a paragraph to 50 characters? because everytime I access the database it would show up the entire paragraph.

View Replies View Related

Characters

I have the character & (username is a&d) in a username in one of my database fields and it won't read it properly. Do you have to do something special with characters like that?

sqlString = "SELECT * FROM Users WHERE UserID=" & "'" & userid & "'"

View Replies View Related

Returning Only 255 Characters

I have a MS SQL 7.0 table with a large field (> 500 characters). My select statement embedded in my ASP file in an intranet web interface only returns 255 characters. If I run the select statement in Query Analyzer, I can easily change the "Maximum Characters per Column" setting to return the entire field, but that doesn't help me in my ASP web interface. How do I return the entire field through ASP?

View Replies View Related

Count Characters

Is is possible to accurately count the number of characters in a Word document using ASP?

View Replies View Related

Characters From DB Record

What I am trying to do could be simple but I have no idea how to it. I am trying
to display only a part of the record retrieved from database.
I have retrieve data from database and I show it in normal way <% = oRs(0)%>, the problem is that I want to show only 100 first characters and then make some thing like this … after 100 first character. In this way all the data retrieved would look the same in the page.

View Replies View Related

ASP Trims Characters

One of our offices in AD is called "Albert St", the OU is called "Albert St", but when I retrieve the value out of the list box it becomes "Albert" and throws errors as it cant find the "Albert" OU. Not surprising, really. I am going to try type casting, but beyond that

View Replies View Related

Nwanted Characters

I have a wee lil problem when I am inserting data into my db from my asp page.
The problem is that it is inserting unwanted characters with the values.
I have used the following to try and remove the unwanted characters but to no avail:
Code:

varRootCause = CStr(Replace(Request.form("txtRootCause"), "'", ""))
rsUsers.Fields("RootCause") = trim(varRootCause)


The above gives me this: Quality of service,
The comma at the end should not be there.

View Replies View Related

Numeric Characters

I have a variable I'm pulling from a database that's a phone number in XXX-XXX-XXXX format. What I'm looking for is a way to strip out all non-numeric characters from the variable (XXXXXXXXXX). I don't want it to look only for "-", since sometimes, there are also alpha characters entered as well.

View Replies View Related

Escaping Characters

I need to put the following code within a <% %> block :

response.write "<tr>" &_
"<td bgcolor=eeeeee><a href=""company.asp?company=rs("companyKey")" &
"orderby=name"">"&naym&"</a></td>"

How do I escape the characters " etc?

View Replies View Related

Inserting Characters

Im doing a update page and noticed this error, whenever you want to write for example "can't, i've" it errors on submit, but characters like "." are okay. Why doesn't it like these characters and how can i make it like them? I need some extra code?

View Replies View Related

Retrieving 200 Characters

I have a SQL statement to retreive results based on keywords entered
I only want to show the first 200 characters of the field though, how would I modify this code to do just that?

SQL = SQL + " instr( 1, lcase( description ), lcase( '" + aKeywords(i) + "' ), 1 ) > 0"

I thought it would have been something like:

SQL = SQL + " (left(instr( 1, lcase( description ), lcase( '" + aKeywords(i) + "' ), 1 ), 200) > 0"

View Replies View Related

Characters Invisible

I am currently building a website and in one of the pages, it is to return Immediate, Extended, Standdown instead of 1.Immediate, 2.Extended, 3.Standdown(in the Ms Access). I am wondering if there is any quote to help me not display the first 2 characters(eg 1.) but just the 3rd character onwards.
# I need the numbering there for future usage thus i cannot remove it from the Access database

View Replies View Related

Allowing Different Characters

I have created a form in which people insert there fax number, at the moment it returns an error if a space is inserted in the fax number ie: 0234 76893.
How do I correct this?

View Replies View Related

Characters In A Querystring

How many characters can be passed from one page to the next in the querystring

View Replies View Related

Use Special Characters

The website that I am developing is having a search option. The search is according to the type of Industries, like IT-Software, IT-Hardware etc. I am using procedure to search through the database. Now whenever I Select an Industry name like IT - Software, FMCG/Foods/Beverages(i.e with special characters) etc. i get an error message Code:
Line 1: Incorrect syntax near '/'.
here is the code where I am getting the error

Code:
strSQL = "sp_getsearchvacancy " & sind & "," & sexper & "," & currentPage & "," & iRecordsPerPage
objRS.Open strSQL, objConn

this is same for every keyword having special characters like / , - and even space
But when I use keywords without any special character its works fine.

View Replies View Related

Limit The # Of Characters

I'm pulling product descriptions from the database and would like to limit the number of charcters that is displayed. Also, I'd like to add ... at the end.

Something like:
This long text is boring blah blah blah

would dispaly as:
This long text is bor

View Replies View Related

Characters Replacements

I have a database with names, lastnames which has special characters to be seen (10-15 of them), for example: "{" has to be "š". I emphasize - those characters are not to be replaced in the database, but just to be replaced when go to the screen.Is the only way to do that function replace in the user function that has to be made?
I have to say that I have to make the similar function for data entry - input also, which has to replace those characters before - for example search.

View Replies View Related







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