how to permanently remove apostrophe


help me again , I am only new in ASP world and my knowledge is not so broad.

I have a back end MS Access. I need to remove the apostrophe. i mean like this: ASP's .Net when I add this i got a syntax error.

i don't know how to remove, replace or escape this before they passed to and from the database using web pages.


all the value with apostrophe I got syntax error.

please help me.






Posted On: Monday 15th of October 2012 11:13:40 PM Total Views:  171
View Complete with Replies

RELATED TOPICS OF ASP PROGRAMMING LANGUAGE




Javascript within ASP apostrophe problem, little help?

I'm trying to use Javascript within ASP but I am receiving a "Syntax error" can someone please show me what's wrong with it I suppose it must be something\tto do with the apostrophes: (its all written on one line).Many
VIEWS ON THIS POST

125

Posted on:

Monday 15th October 2012
View Replies!

That old apostrophe problem

I know I need to add in some code CODE(lname = replace(lname, "'", "''"))to handle apostrophe's in input fields but for the life of me cannot work out where to do it in this Macromedia generated code.Help....TIACODE RecordSet1_total) Then\t\tRecordSet1_numRows = RecordSet1_total\tEnd If\t' set the first and last displayed record\tRecordSet1_first = 1\tRecordSet1_last = RecordSet1_first + RecordSet1_numRows - 1\t\tIf (RecordSet1_first > RecordSet1_total) Then\t\tRecordSet1_first = RecordSet1_total\tEnd If\tIf (RecordSet1_last > RecordSet1_total) Then\t\tRecordSet1_last = RecordSet1_total\tEnd IfEnd If%>= MM_rsCount Or MM_offset = -1) Then\t' past end or move last\t\t\tIf ((MM_rsCount Mod MM_size) > 0) Then\t\t\t\t' last page not a full repeat region\t\t\t\tMM_offset = MM_rsCount - (MM_rsCount Mod MM_size)\t\t\tElse\t\t\t\tMM_offset = MM_rsCount - MM_size\t\t\tEnd If\t\tEnd If\tEnd If\t' move the cursor to the selected record\tMM_index = 0\tWhile ((Not MM_rs.EOF) And (MM_index < MM_offset Or MM_offset = -1))\t\tMM_rs.MoveNext\t\tMM_index = MM_index + 1\tWend\tIf (MM_rs.EOF) Then \t\tMM_offset = MM_index\t' set MM_offset to the last possible record\tEnd IfEnd If%> MM_rsCount - MM_size Or MM_offset = -1) Then\t\t\tIf ((MM_rsCount Mod MM_size) > 0) Then\t\t\t\tMM_offset = MM_rsCount - (MM_rsCount Mod MM_size)\t\t\tElse\t\t\t\tMM_offset = MM_rsCount - MM_size\t\t\tEnd If\t\tEnd If\tEnd If\t' reset the cursor to the beginning\tIf (MM_rs.CursorType > 0) Then\t\tMM_rs.MoveFirst\tElse\t\tMM_rs.Requery\tEnd If\t' move the cursor to the selected record\tMM_index = 0\tWhile (Not MM_rs.EOF And MM_index < MM_offset)\t\tMM_rs.MoveNext\t\tMM_index = MM_index + 1\tWendEnd If%> MM_rsCount) Then\t\tRecordSet1_first = MM_rsCount\tEnd If\tIf (RecordSet1_last > MM_rsCount) Then\t\tRecordSet1_last = MM_rsCount\tEnd IfEnd If' set the boolean used by hide region to check if we are on the last recordMM_atTotal = (MM_rsCount -1 And MM_offset + MM_size >= MM_rsCount)%> 1) Then\tMM_moveParam = "offset"\tIf (MM_keepMove "") Then\t\tMM_paramList = Split(MM_keepMove, "&")\t\tMM_keepMove = ""\t\tFor MM_paramIndex = 0 To UBound(MM_paramList)\t\t\tMM_nextParam = Left(MM_paramList(MM_paramIndex), InStr(MM_paramList(MM_paramIndex),"=") - 1)\t\t\tIf (StrComp(MM_nextParam,MM_moveParam,1) 0) Then\t\t\t\tMM_keepMove = MM_keepMove & "&" & MM_paramList(MM_paramIndex)\t\t\tEnd If\t\tNext\t\tIf (MM_keepMove "") Then\t\t\tMM_keepMove = Right(MM_keepMove, Len(MM_keepMove) - 1)\t\tEnd If\tEnd IfEnd If' set the strings for the move to linksIf (MM_keepMove "") Then \tMM_keepMove = Server.HTMLEncode(MM_keepMove) & "&"End IfMM_urlStr = Request.ServerVariables("URL") & "" & MM_keepMove & MM_moveParam & "="MM_moveFirst = MM_urlStr & "0"MM_moveLast\t= MM_urlStr & "-1"MM_moveNext\t= MM_urlStr & CStr(MM_offset + MM_size)If (MM_offset - MM_size < 0) Then\tMM_movePrev = MM_urlStr & "0"Else\tMM_movePrev = MM_urlStr & CStr(MM_offset - MM_size)End If%>Technip Offshore UK Telephone Directory\t \t\t\t\t\tSearch returned no results. Return to Search Page\t\t\t\t\t\t\t\t\t\t\t\tReturn to Search Page\t\t\t\t\t\t\t\t\t\t\t\tRecords to of \t\t\t\t\t\t\t\t\t\t\t\tFirst\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tPrevious\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tNext\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tLast\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tTel\t\t\t\t\t\tLast Name \t\t\t\t\t\tFirst Name \t\t\t\t\t\tInitials\t\t\t\t\t\tMobile\t\t\t\t\t\tJob Title \t\t\t\t\t\tDepartment\t\t\t\t\t\tOld Number \t\t\t\t\t\t \t\t \t\t \t\t\t \t\t \t\t\tFirst \t\t \t\t \t\t\tPrevious \t\t \t\t \t\t\tNext \t\t \t\t \t\t\tLast \t\t \t\t\tReturn to Search PageRecords to of \t\t\t\t\t\t
VIEWS ON THIS POST

89

Posted on:

Monday 15th October 2012
View Replies!

remove http:// charcters from string

hii want my users to enter a web address as www.bbc.co.uk for example not http://www.bbc.co.ukif they do enter http:// at the start how can i best remove it before sending the result to the database thanksI thought of doing something like CODEleft(str, 7)if str = "http://" thena = len(str)replace str(str, mid(str,8,a-7))
VIEWS ON THIS POST

198

Posted on:

Monday 15th October 2012
View Replies!

remove duplicates but distinct wont work...

! im currently making a report page that shows all items bought in our site. im fetching values from 2 tables : products & orders. my query is working fine but it also shows duplicate entries.here is my sql query: SELECT distinct orders.pid_ordered,orders.orderdate,products.prod_id,products.costused,products.cost1,products.cost2,products.cost3,products.cost4,products.price,products.timesbought,products.prodname FROM products,orders where DateValue(orders.orderdate) BETWEEN #1/2/2004# AND #1/7/2004# AND products.prod_id = CInt(orders.pid_ordered) order by products.timesbought desc The prob lies in the "distinct", i was able to determine that the reason it wont work is that every product id in the orders database has different order dates so it was regarded as a distinct row. how can i still fetch the needed data without duplicates im not quite familiar with inner joins, is it the solution _______________CRYOcoustic_____________
VIEWS ON THIS POST

188

Posted on:

Tuesday 16th October 2012
View Replies!

Displaying the Title containing an apostrophe

Hi Guys...I have this below piece of code...Response.Write " "&commentID&" "It works fine and displays the comments in a cute little box when the mouse is placed on commentID but....when comments contain an apostrophe... i get the comments truncated at the apostrophe and displayed in the box...How can i display the whole comments even if it contains an apostrophe
VIEWS ON THIS POST

169

Posted on:

Tuesday 16th October 2012
View Replies!

remove the page.asp after the link

I have a curiousity.\tHow can I remove the page.asp link from the address bar\tFor example I have a link called www.mysite.com/page.aspf=1, after the user clicks on the menu navigation.\tHow can I get rid of page.aspf=1 so that only www.mysite.com appears\tAnother thing, will request.querystring still work then
VIEWS ON THIS POST

201

Posted on:

Tuesday 16th October 2012
View Replies!

DSN, Storing variable permanently

I have Windows 98. My two databases is set up in Control Panel, ODBC Data Sources, User DSNMy program will be using two databases. I am using a drop down menu for the user to pick which database to work with. Once the database is picked, they will be using it on all other pages. After selecting the database, I need to store the variable somewhere to access it on all other pages. I have used global.asa to store variables that are hardcoded in and that works find. Reading up on it, i don't see how to send a variable to global.asa to store it, or for that matter if you can.Can you send a varible to global.asa to be stored and used in other pagesIf yes, howShould I put it in an asp include, I am going in that direction Here is my code.------selectdatabase.asp--------\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tDatabase:\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGateKeeper\t\t\t\t\t\tGKAdmin\t\t\t\t\t\t----Choose One------\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t----------database-var.asp----------1/ It seens to be selecting the database ok. There are no errers, but I am not getting anything from Response.write username2/ When the database is selected, how do i store it permanently while the user goes to other pages and call it from other pagesThank you, Larry
VIEWS ON THIS POST

56

Posted on:

Wednesday 17th October 2012
View Replies!

how to remove comma from text area

I am using a text area for multiple selection of entries through which i want database columns to be searched. but when i get a reponse on the next page, i get it with comma inserted in between multiple selected entries. how shuold i deal with it, so that it is searchable within a column of a database..
VIEWS ON THIS POST

184

Posted on:

Thursday 18th October 2012
View Replies!

Delete button to remove corresponding row in sql server 2005 in asp apge not working

hi , I would be really grateful if you could help me. actually i have got a table in asp page which each row having a delete button.when i click the button the corresponding row in the sql server mudt be deleted. pleas find some of my codes below Server.ScriptTimeout = 7200 if request.form("btnDel") = "Del" then call DelRow() end if sub Delrow() dim sql dim record sql = "DELETE FROM Q_table WHERE QCode='" &Request.Form("txtQCode") set record = Server.CreateObject("adodb.recordset") set record = con.Execute(sql) end sub sub LtQu() str = "SELECT QCode,QTitle,A.ABody,Date,ExpiryDate " & _ " FROM Q_table as QM INNER JOIN ABody as A ON A.ABodyC = QM.Abody " set record = Server.CreateObject("adodb.recordset") set record = con.Execute(str) RecCount = 1 do while not record.eof 'str = str & " & "" & "^" str = str & & "" & "^" 'str = str & "^" & "" & "^" end sub
VIEWS ON THIS POST

204

Posted on:

Wednesday 24th October 2012
View Replies!

Function to remove text between html tags

can someone help me create a function to remove text between html tags (so that all I have left is the html tag itself
VIEWS ON THIS POST

192

Posted on:

Friday 26th October 2012
View Replies!

2 dimensional array -> remove order (redim?)

hello experts, question to you.. I created a shoppingcart by using a 2 dimensional array. It al works fine, so adding items works correctly and removing items from the cart almost correctly. This is why i need your help. The first dimension of the array contains productcode, price, quantity etc... (4 elements in total) The second dimension contains the actual orders. Lets say i put 4 orders into the shoppingcart: 1 2 3 4 Example: When i remove order number 2, then the array has to be resorted. This all works fine but now i have order number 4 twice, because it wasn't actually removed. Here is the code: Code:
VIEWS ON THIS POST

142

Posted on:

Friday 26th October 2012
View Replies!

Auto-remove bounced email addresses from mailing list

I'm about to build a website which houses a mailing list. The site is hosted on a shared server - I don't have access to the server in terms of installing components or configuration or anything like that. I'm going to operate the list via asp - using a CDONTS loop or JMail to send the mail. I need to do one of two things however, to make sure the list is maintained and accurate. Either: 1. Somehow record bounced emails, so that they are flagged as 'expired' in the database, or even removed. Is this possible using ASP or any common mail component Or: 2. Periodically (e.g. every 90 days) send out an email to the entire list, asking them to confirm their registration. In this instance, how do I automate the script to run every 90 days without an administrator having to remember My hosting company offers a mailing list service, but it won't integrate into my database (which is something I really need, since the mails will be bespoke for each recipient - depending on what information they have signed up for). If anyone could shed any light on the best way to do this, and how it can be achieved, I'd be really grateful,
VIEWS ON THIS POST

347

Posted on:

Friday 26th October 2012
View Replies!

How to remove blanks from a list menu??

One of my tables is used for two purposes so there are blanks in the column I'm filtering. I tried using an IF statement but it still put the blanks in the list menu. Any idea how to remove the blank items\t My code: Code:
VIEWS ON THIS POST

216

Posted on:

Friday 26th October 2012
View Replies!

remove multiple lines?

i'm creating an app where the user will copy/paste BIG word documents into a textbox to save into db. problem is -> some of the documents have a lot of whitespace which needs removed. anyone know of a script / method to remove multiple lines of whitespace i.e. if i come aross a large portion of whitespace (extra lines) i want to remove them and leave only one line in it's place. tia.
VIEWS ON THIS POST

183

Posted on:

Friday 26th October 2012
View Replies!

how to remove the gap between 2 images

i have problem in removing the gap between two images, pls see the attached image. coz my item name is quite long, i dun wnat it display in horizontal, i want it display as vertical. so i create the images for the character and use ascii to recognized it. my code is as below: can anyone help\t
VIEWS ON THIS POST

411

Posted on:

Friday 26th October 2012
View Replies!