I Have Records Where I Need To Replace One Letter With Another.
I have records where I need to replace one letter with another. Can I modify this highlighting code to do that?
What I need to do is to update my table of database where a column has to replace one letter with another. WHat I have is the "insert into" statement where I duplicated the table (not shown below) Code:
View Replies
ADVERTISEMENT
I am using asp and access database on my page Up untill now I have just been listing all catagories from the database on one page, now the list has become huge.
I would like to have a page with an alphabetical list of links A, B, C etc and then just display the catagory records beginning with A etc depending on user input.
View Replies
View Related
If I replace "a" with "b", and then I replace "b" with "a", shouldn't I get the same result? That is what I am trying to encode and decode with Replace() function, but it is giving me different things when I replace and replace again. Here is what I am talking about: Code:
View Replies
View Related
1. The file is on a map drive, which is mapped to a folder
on the same server. Example. The user's folder 'John'.
2. I am able to get the file information
("E:PhotosImage1.jpg") and can copy the file to the
folder. ONCE I KNOW THE UNC ("headoffice-
dellsystPhotosImage1.jpg" file to copy)
I would like to be able to get the UNC from the user's
system, by submitting the drive letter to a function.
This script is for an Intranet and should be in ASP or
JavaScript.
..
View Replies
View Related
After I read in a value from a table i need to read in the last letter of the value and check if it has an "s" as its last letter, so that i can display either ' or 's.
Does anyone know how code to view the last letter of the value or move the variable into javascript so that I can manipulate it from their?
View Replies
View Related
i want to query a fields first letter.how can i do this?Code:
strsql = "SELECT * FROM COORD WHERE First='" & Request.Form("UserName") & "' AND last LIKE '%" & right(last,1) & "%' and active ='" & Request.Form("Password") & "'"
I want the search last by only the first letter of there name.
View Replies
View Related
i need to convert the first letter of a veriable to uppercase (the veriable is loaded and the applied LCase() ).
View Replies
View Related
im building an ecommerce site. I asked the client to populate the database i built with all 3000 of their products. They have done this, but put all the data in in CAPITALS. Ive tried 'capitalising' (first letter of each word is a capital) the words in css, but that doesnt work because the letters are all in caps (it would work if they were in lower case).
Has anyone a function written in asp (jscript) to achieve this? Or should I try doing this in sql if this is possible?
View Replies
View Related
I want to take a value that users type into a field (actually 2 fields--first and last name) and convert the first letter to Upper Case. I thought I could use UCase, but it seems to only work for an entire string.
View Replies
View Related
We have an ASP VBScript email autoreply. I'd like to make it extra squeaky-clean and have it auto-capitalize the user's first name if they did not. I.e.
"Dear bob, your order has been placed."
to
"Dear Bob, your order has been placed."
I realize that probably the pro way would be to normalize it in the DB when they first sign up.. but this is not necessary, I just need some kinda left-trim-uppercase-codeamabob.
View Replies
View Related
What query would I have to use to select entries from a database where there first letter is a letter of the alphabet? ie. Select all entries starting with an A etc.
View Replies
View Related
How to make first letter of word in upper case?
i.e. hello should return Hello
Is there any inbuilt function?
View Replies
View Related
Basically i have a string with a value that either starts with U or N.
If the string starts with a U, I would like to chop that U off but leave the rest of the string. If it starts with an N, then i would need to keep the N on the string. For example,
strUID = U369373
If strUID = 'starts with a U' Then
'Chop off the U to create 369373 instead of U369373'
End If
Should be a fairly easy logical statement, but i just forgot the variables to do that.
View Replies
View Related
when I ourput data from Access, numbers bigger than 999 are shown with letter "B" inserted into the 4th position left to the coma. (in my w2k regional settings I have the decimal dot separator set to "." and digit group separater set to nothing. In Access the number are shown with "." as decimal separator, but for some reason ASP used "," instead)
Say, 3000,00 is shown as 3B 000,00 Why and how do I sort this out?
View Replies
View Related
I need to figure out how many instances of a certain letter appears in a string or array. The result should appear in a message box, looking something like this:
- The letter a appeard 2 times
- The letter b appeard 5 times
and so forth.
Any ideas on how to acomplish this?
View Replies
View Related
I have a dynamic table asp/vb that is returning records as expected. There are 7 fields that are returning boolean values based on whether there is or is not a meeting on those given days.
My table is returning TRUE and FALSE and all I want to do is create an if or select statement that will detect the values in these fields and change them as follows:
If true, then field = "R" (Wingdings2 R is a checked box)
If false, then field = "T"(Wingdings2 returns a x'd out box)
View Replies
View Related
how to create automated MailMerge which creates a form letter using SQL connection using ASP?
View Replies
View Related
i want to make a data field with an auto numbering , but i exactly want is like this CT-1 , CT-2,CT-3 , the Ct letters must be before the autonumber , so its seems to me in that case i cant choose the dat field in my db as int and choose identity Yes cause the identity seed will be an integer only and no way to put with it a number.
so i want to make throw asp and put this datfield as a char so it can accept the(letter-number)value , so how can the asp make an autonumbering, and know what the lastnumber so it can add 1 to it.
View Replies
View Related
I'm trying to grab my form field and convert the first letter of each sentence to a capital letter, and the rest of the sentence lowercase (except for I, A etc..)
I've searched all over the place, and only came across functions that convert the first letter of every word to upper case. Now they call these proper case functions. I was taught in grade school that proper case is the first letter of a sentence is capital, and the rest are lower case. So WHY does everyone call these functions proper case functions??!!?? Ok enough venting.
Anyways if you know where I can find a similar function please help me out. I'm sure I could code this, but I just don't have the time right now, and I'm tired, and the Colts lost.
View Replies
View Related
I'd like to know how can I make the first letter of every word on a textbox field, uppercase, automatically. I'd like to use this for the Name and Surname field, but I don't know how... any hint?
View Replies
View Related
I have a asp page with a database connection where I need to export adresses
into a MS Word Serial Letter. Is this possible and if how??
View Replies
View Related
Im trying to remove every single letter word in a sentence [a-z] or [0-1] and remove duplicate spaces in the result if any.
"a car is good" = "car is good"
"drink a beer" = "drink beer"
View Replies
View Related
What's a way (like, for a username) to allow lowercase and uppercase letter, and numbers?
Code:
objRegExp.Pattern = "[a-z][0-9]"
objRegExp.Global = True
objRegExp.IgnoreCase = True
That's what I have, but I want to make the letters or numbers OPTIONAL, but right now they are required. how can I fix that?
View Replies
View Related
The problem concerns 2 tables, cart_products and cart_shoppingcart.
Cart_products contains all the product data (eg, prices, product's key name, etc), but most importantly, it contains the quantity of stock (prod_quantity) for each item.
cart_shoppingcart contains all of the user's items in their shoppingcart, including those that are part of an (customer) order; these have the order_number to differentiate from those that aren't in any order (their Order_number is 'no_order', the others have the order number).
Now, what I want to do is this:
For every item in the order (ie, every entry in cart_shoppingcart that matches the username and order number), take the quantity (x) the customer is ordering, then take the quantity of stock remaining (y), then subtract x from y to create the new stock level (z) and update the appropriate record in cart_products with z (all this with SQl preferably).
I was thinking of using a Do while loop, but realised that it wouldn't work as I'd have to use several SQL statements and then I'd run into a problem the minute ASP reads "objrec.movenext".
View Replies
View Related
I'm trying to pull the last 5 records from my database.
<% j=5
rs.MoveLast
While ((j>0) AND (NOT rs_article.BOF))%>
''Execute HTML and data insertion here
<%rs_article.MovePrevious
j=j-1
Wend%>
Everytime I attempt to run this code, I recieve an HTTP 500- Internal Server Error. It tells me no more than that. I know that my connection settings are OK because when I move forward through the database (first five records), the code executes without error. And yes, my Cursor type is Dynamic.
Alternatively, I would also like to know how to add new recordset to the beginning of a database rather than the end.
View Replies
View Related
I have an Access database with two fields that I would like to group by. The two fields are location and department. Field names are "Location" and "DeptName".
I have the code correct for grouping by location. That code looks like this: Code:
View Replies
View Related
some text is coming out of the DB with different urls in it, i want to delink it (like href="#" or something), how do i do that when i don't know what url is coming out?
View Replies
View Related
I've got a function that I use to replace ' marks so the page will insert properly into a database - typically I use .Code:
whatever= request.form("whatever")
whatever = replace(whatever,"'", "''")
However, I've got some code that I unfortunately inherited from someone else that I can't get the replace to work:Code:
call buildquery (colq,valq,retq,"whatever")
colq = "(" & colq & ")"
valq = "(" & valq & ")"
ssql = "insert into table_name " & colq & " values " & valq
I was trying to do something in the call buildquery line to add a replace, but that doesn't seem to work.
View Replies
View Related
How do I take out double quotes before writing to database? As doing ,""",""e;" created an error.Is it something like ,chr(34),""e;" which I sort of stumbled accross when I did soem google searching... But what and where do these chr(34) etc coem from?
View Replies
View Related
I have lots of textbox that needs to have data entry. Is it possible for me to replace the tab key to return key that transfers the focus from one textbox to another? And also, how to submit the form after all textbox have values?
View Replies
View Related
I come across this often
PHP Code:
Replace(rs.fields("Headline_f"),"''","'")
Where rs.fields("Headline_f") is actually empty.
I usually use
PHP Code:
IF NOT isNull(rs.fields("Headline_f")) or rs.fields("Headline_f") = "" THEN
Headline_f=Replace(rs.fields("Headline_f"),"''","'")
END IF
Is there a better way to handle this?
View Replies
View Related
Even though I ask customers to enter there phone number like xxx-xxx-xxxx they some times don't. go figure:
I create a text file thats used by the factories EDI system and the number needs to be xxxxxxxxxx. I'm using the code below but what if they enter their number xxx.xxx.xxxx OR (xxx) xxx-xxxx etc. You get the idea.
strPhone = Replace(objRS("DayTimePhoneNbr"),"-","")
Does some one have a small chunk of code to help me replace additional chars?
View Replies
View Related
My form gets populated from an access database. Now in the database there are fields containg <br>. While in a normal page everything works as it's supposed to, in my listbox the <br> shows as it is. What I would like to do is replace it with a space so I've used this:
<option value="<%=(rsProducts.Fields.Item("CatNum").Value)%>"><%=replace(rsProducts.Fi elds.Item("NotesR").Value),"<BR>"," "%></option>
but it doesn't seem to work.
What exactly am I doing wrong here?
View Replies
View Related