Best Way To Handle An Apostrophe
I know a few ways to handle an apostrophe, but am at a loss for which i should use for this. The ways I know how to deal with it are.
alias = Replace(Request.form("alias"), "'", "''")
alias = Replace(Request.form("alias"), "'", " & #39; ")
The name of the field is self explanitory. When the admin searches for a person using the "'" , " ' ' " method they find the user. But when ever we display that info anyware it has the O''conner setup. Code:
View Replies
ADVERTISEMENT
I am getting a bug with regards to submitting an ASP form. Here's the scenario:
I am entering info in a form and calling an ASP page to process it. I am collecting info from the fields like so Code:
View Replies
View Related
I’ve a form with a textbox called Message. When visitor enters text, I use Replace function to handle an apostrophe code that will receive the text and store in the database.
It works fine.
When I try to retrieve the text message, it doesn’t show what I’ve in the DB, but it displays, for example: I?m. It supposes to display as “I’m”
I did try:
<%message= Replace(trim(RS("message")),"'","''")%>
<td><p><%=message%></p></td>
View Replies
View Related
I know this is a very commonly asked question, but I can't find a solution
anywhere that I have looked.
I need to take the text that will be typed in paragraph form by the user
(textarea field) and do two things with it:
1. Store it in a SQL Server database field
2. Send it in an email upon page submit.
Of course, single quotes have caused problems, so I have this code:
strInternalDesc =
Replace(Trim(Request.Form("InternalDesc")),"'","''")
Problem is, it shows up like this in the email that is sent:
==============================
We''re in the process of
==============================
I would like to get rid of the double apostrophes, but not sure how. Went to
an article on ASPFAQ, and saw something which directed me to do this:
strInternalDesc =
Replace(Trim(Request.Form("InternalDesc")),"'",chr(34))
However, that just makes it a regular double-quote. I guess I could try and
find out what the character number for apostrophes are, but not sure where
that is. Besides, will that mess up my SQL Server or the email if I do that?
View Replies
View Related
i have a textarea in my form, and it worked. but if the input text contains apostrophe, i would get sth like this:
Microsoft OLE DB Provider for ODBC Driverserror '80040e14'
[Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression ''rtert'','Judy Nadia Jolonius');'. /saveRemarks.asp, line 195
how can i make asp ignore the apostrophe?
View Replies
View Related
I'm trying to query a database where some records contain apostrophes in them. Is there an effective way to do this?
View Replies
View Related
I am running into a very common problem that i cannot seem to find a solution for. I have an access database with a text field. Some of the records will contain an apostrophe. i have used the replace method to escape the apostrophe and turn it into ~~~. I can sucessfully change that back to an apostrophe everywhere but a text box. Here is my code:
response.write "<input type=text name=title" & icount & " value='" & replace(rs("title") ,"~~~", "'") &"' size=55><br>"
View Replies
View Related
Below is the code I use to send data from form to database. Problem is if an apostrophe is entered in cQuestion field or any field for that matter the form errors out. Code:
View Replies
View Related
When I want to execute a SQL statement (as we all know) certain characters will cause an error. You can't execute a statement with a " in one of the parameters or else the command will stop short and result in an error.
Let's say for example that I'm trying to update a field named "code" and the value of the field "code" is: Code:
View Replies
View Related
I currently have a simple html page that consists of a text box and submit button. A user supplies a quote in the text box and presses the submit button. When the submit button is pressed the quote is added to a ‘Quote’ table in an MS Access database.
This works perfectly well, however if a quote contains an apostrophe, such as … this won’t work… It will not add to the database. If I had typed in …this wont work… It would be added to the database with no problems. Code:
View Replies
View Related
how to add the symbol ' (Apostrophe) to the code so that the validation accepts this within a surname such as o'neill? this is wot i hav at the minute:
With regExName
.Pattern = "^[a-z]+$"
.IgnoreCase = true
.Global = true
End With
View Replies
View Related
how to accept ' or apostrophe when adding on the database? because I created a simple guestbook and when i tested it it works fine but once i add apostrophe like TOY'S etc it generates error.
View Replies
View Related
I am having a problem with the apostrophe not showing up correctly when doing a mysql query and returning the data.
I am using a function to keep apostrophes from causing the queries to fail and the data that does get displayed to the user (html) turns out right 90% of the time but on a certain page it displayes the apostrophy twice instead of once. Here are the relevant pieces of code:
View Replies
View Related
I am using a Replace function to replace single quotes with double when
submitting a text field in the database i.e. Replace (q, "'", "' ' ")
which works fine. When I retrieve the field from the database which has
apostrophe I am getting 'Object expected' error message. Is there a
way to fix this?
View Replies
View Related
Isn't there some line of code that I can write to tell ASP to treat everything between BLAH and /BLAH as text (including the apostrophe). So that users can type a name of "O'Malley" in a form and I can retrieve it and store it in my database.
View Replies
View Related
What is the correct data type to use if the phrase I'm saving to my table contains an apostrophe such as in the phrase "yesterda's news". I've tried "text" data type, I've tried "varchar" and "char". They all give me bugs when I save to the database and if I remove the apostrophe from the phrase, then it saves correctly with any data type.
View Replies
View Related
I am trying to create a popup page to print little cards to Avery labels. I can get the page to work out but it always prints the margins to far over so it doesn't fit in the cells. I was wondering if any one new any resources to give details on how to accomplish this or of another method?I have also tried creating a dynamic word doc but then the user could change the text values which wouldn't work.
View Replies
View Related
I have a page with multiple SSI to content that is managed by other people in the organization. However, occassionally, one of the content managers accidently deletes a file or messes it up, which throws an .ASP error for the whole page. This is not good. I need to display the page, even if some of the include links are broken.
I tried using:
Code:
<%
On Error resume Next
%>
View Replies
View Related
I need to let one person view certain things without having this perons
login. This person is logged in to the microsoft network. How do I get
that info into a variable?
View Replies
View Related
if i have a recordset which contains a variable call remarks(which can be of any value)
how to i store this in an array? wat is the synatx?
array=rs1.Fields("REMARKS").value ???????
the need it cos i need to count the specific number of character inside this REMARKS. meaning say i output char 1 to 100 at box 1... and char 101 to 200 at box 2.
View Replies
View Related
i'm about to built a budget DB driven site for someone. access is the cheapest option for me, as my host charges for mysql, plus i aint used it before! [:I]
they anticipate around 250 visitors per day. would access on a dsn-less jet connection hold up? how many consecutive users would it handle before it fell over.. ?
View Replies
View Related
I've tried inserting this code, but it doen't work. I guess it must be something to do with the byVal keyword used in the constructor for the function?
Code:
'Handle a Null date
If (strDate = "" ) Or (Len(strDate) < 1) Or (strDate = Null) Then
fncFmtDate = "N/A"
Exit Function
End If
View Replies
View Related
I created a web site for a local government office to handle their procurement. When the city modifies a solicitation, all of the respondants need to be notified. Unfortunately, the city wants the email sent to each respondant to be individualized, so I can't just CC or BCC it to several hundred email addresses.
After about 200 emails, the server usually times out. The city is hosting with Verio and Verio won't change the timeout values since it's "virtually hosted". Is there a way to spawn a background task to send the emails? If not, what's the best method for batch send?
View Replies
View Related
How do i handle a subtraction between 2 entries in a table? they each belong to 2 tables. my code is below. I wish to subtract ordereditems_quantity from product_stock but i have no idea how to do it in asp. pls advise.
sqlString="SELECT * FROM products, ordereditems "
sqlString = sqlString & "WHERE product_id=ordereditems_productID"
RS.OPEN sqlString
product_stock = RS( "product_stock" )
ordereditems_quantity = RS( "ordereditems_quantity" )
View Replies
View Related
How do i handle a subtraction between 2 entries in a table? they each belong to 2 tables. my code is below. I wish to subtract ordereditems_quantity from product_stock but i have no idea how to do it in asp.
sqlString="SELECT * FROM products, ordereditems "
sqlString = sqlString & "WHERE product_id=ordereditems_productID"
RS.OPEN sqlString
product_stock = RS( "product_stock" )
ordereditems_quantity = RS( "ordereditems_quantity" )
View Replies
View Related
some of web search place my url with a problems:
like this:
http://www.mywebsite.com/page1.asp&&DI=293
View Replies
View Related
I've integrated a secure certificate into my e-commerce site. However, when I forward people to the account log-in area (https) all of the relative links on the page obviously then point to http://www.mydomain/homepage for example.
How do I do what Dabs do, and redirect these links back to non-secure pages, without hard-coding all links as full URLs?
View Replies
View Related
I've got a form that allows someone to upload a file. I need to know how I can grab the filename from the uploaded file information so that I can store it in a database. I also need to be able to move the uploaded file to a specific directory.
I'm new to both ASP & VBScript but I have both of their "In a Nutshell" O'Reilly manuals. There's no mention of file uploads in the ASP book and I'm just not sure if the info in the VBScript book is what I need either.
Do I need to create a File object? If so, how can I use GetFile to retrieve the downloaded file? Do I access it via Request.Form("filename")? That should be the actual file, right? But how do I get the actual file name from that?
View Replies
View Related
I'm connecting to an MS Access database using ASP. Within my database I have duplicate records (more specifically records with the same serial no.). When I search by the serial number only the first record is displayed. I would like to display all records containing the given serial no.
View Replies
View Related
What is the best way to handle inserting double and single quotes into a database via input from a form?
It's not a good option to remove them, since I need the text to contain punctuation sometimes. Likewise if I replace them with special characters (e.g.
Code:
& # 34 ; (without the spaces)
) it buggers up any HTML formatting I have in the textbox.
Is the best way to handle this to replace with HTML special characters then replace them back again in the database output?
View Replies
View Related
I need to let one person view certain things without having this perons login. This person is logged in to the microsoft network. How do I get that info into a variable?
View Replies
View Related
how to handle more than one submit button's request in an asp page. ie........
multiple web pages are leading to a single asp
page atlast. i want to distinguish between the web pages that are posting.
View Replies
View Related
I inherited an ASP app at my new job. One of our potential customer would like to purchase it. He asked me if I know how much traffic can our ASP app handle. He also asked me if I can give him the rest "tech specs" about the web application.
I told him the app uses MS ASP technology and needs a MS SQL Server DB to store the data. But, how can I figure out how much traffic an ASP app can handle? Also, what does he mean by "tech specs"(other than what I already told him)?
View Replies
View Related