When To Use Quotation Marks In SQL

When do you use quotation marks around values in an SQL Statement, and when do you ignore the quotation marks completely?

View Replies


ADVERTISEMENT

ASP - Quotation Marks

I have a number of records I need to display in a list box (dynamic) - some have quotation marks and the system chokes on them.. whats an easy way to overcome this?

View Replies View Related

Quotation Marks

I am trying to copy an uploaded document from one directory to another. The uploaded file (attach1) will be dynamically named. The resulting file (LName) name is based on a last name field. I have the following code but I cannot figure out how to deal with the issue of quotation amrks. Should I escape them or do I use another method?

dim fs
set fs=Server.CreateObject("Scripting.FileSystemObject")
fs.MoveFile "E:Inetpubwwwrootuploads<%=(frmSend.Fields.Item("attach1").Value)%>.doc","E:Inetpubwwwrootuploads
amed<%=(frmSend.Fields.Item("LName").Value)%>.doc"
set fs=nothing

View Replies View Related

Ignore Quotation Marks

I can't seem to find the right way to do this, how do I get ASP to ignore a quotation mark in a string? " doesn't work.

View Replies View Related

Quotation Marks Not Appearing

Just like my other post about quotation marks not appearing,I am having trouble with foot marks (').

They are going in as ' but are appearing on the user's end of the database as ` Minor.

View Replies View Related

Replacing Quotation Marks

The following removes any unwanted apostrophes before being inserted into an sql database:

Articletext = replace(articleText,"'","''")

..but if I need to remove all quotation marks, this doesnt work:

Articletext = replace(articleText,""","''") Code:

View Replies View Related

Single Quotation Marks

Just wonder how you guys handle the single quatation marks when you write the value of a text input into SQL server.

View Replies View Related

Double Quotation Marks Not Being Processed In Html/asp Form

I originally believe this was a database issue untill I tried to run this using just pure forms.

Issue. I have a form (basic form) and at one of the steps.. the user inputs an article name (and in this case.. there is a set of doublequotes used in this name).

I used the name ( In "Search" of the three Ethical Reviews )

<input type="text" name="Article">

Now I filled in the rest of the data Including a large section with just paragraphs of text that includes quotations marks, slashes, etc etc.

I click the submit button which Transfers all this information into a review page. The review page is another asp page that merely drags all the info from the last page and displays it on the screen for re-editing. Example Code:

View Replies View Related

Getting Around Quote Marks And Apostrophies

I am working on building an asp forum, (I have posted a few times with questions ) and it works for the most part now, but I am trying to fix some things.

I am storing posts in a memo field. Originally it was text fields, but 255 characters is just not good enough.

Now, posts are saved fine except for 2 things:

1/ " and ' cause errors. These are causing conflicts with my INSERT SQL statement that is made. How would you get around this problem, I wonder?

2/ New lines etc are not being put into the memi field. I can live without this for the time being, but at some point I will want to implement posts being outputted in the same format they were inputted. Any advice on how to deal with this issue?

View Replies View Related

Quotation Problem In ASP

When the quote mark (") is the last character on a string, it does not output on input boxes because the application reads it as the end of the value. How can I get the quote mark to appear in input boxes?

View Replies View Related

Wrapping Variables In Speech Marks

I am working on a date function, which takes a YYYY-MM-DD input and splits it into dd,mm,yyyy format. e.g:

string1 = "2006-10-20"

Function stripDate(str)
str_len = len(str)
if str_len = 10 then
str = replace(str, "-","")
str_yr = left(str,4)
str2 = right(str,4)
str_mo = left(str2,2)
str_dy = right(str2,2)
stripDate = str_dy & "," & str_mo & "," & str_yr
else
Exit Function
end if
End Function

test = stripDate(string1)
sample output: 20,10,2006

I then want to pass the sample output into another function, but in order to do that, the date variables must be split with speech marks as follows:

"20","10","2006"

but I can't work out how to include that in the stripDate function so that it wraps the variables in speech marks. Whenever I try to include the speech marks the code returns the usual error about unterminated string constants e.g. if I replace the final line of the above function with this:

View Replies View Related

Printing A Formated Quotation

I'm asked to do Quotation and Invoive modules using asp. To come out with the Quotation or Invoice will not be a problem but I think printing them from the browser will be a problem. The quotation should be formated and printed as if it printed using excel with proper alignment and if the details exceeds the first page it should have the closing line and the next page should have the table header ect.I'm not sure whether this is possible to print in this way from the browser.

If this is not achievable I'm thinking of creating an excel file put all the data inside and open it for the user to print it from excel.Could anyone guide me which will be better way.If creating excel file is a better option sample script.

View Replies View Related

Decline A Quotation Mark In Asp

how can i decline a ' character in asp?

View Replies View Related

Quotation Mark Rules

One thing I've started to notice lately is that asp seems to be very sensitive to how quotation marks are layered. Does anyone know where I can find out when to use double quotes and when to use single quotes? Code:

SelectSQLB = "SELECT * FROM TeamRosters WHERE IDNumber = Session(' 'TeamMember' & LoopCounter')"

Is the line that's giving me trouble and I'm not really sure how to layer it. Every logical combination I've tried has produced a different sort of error. Note that TeamMember# is a session variable and loopcounter is a local variable used to select which TeamMember# session variable to use. Before I've noticed that pretty much it works like this: " ' ' " but that was for two layers deep. What's the syntax for going three layers in?

View Replies View Related

Trapping Single Quotation Mark

I am looking for a way that I can trap the single quotation mark. If an
encoder uses single quotation mark on a textbox field, it always give me an
error because I use single quotes on the SQL statement.

View Replies View Related

Display Ms Access True/false Fields As Check Marks On ASP Page

what is the easiest way to display Yes/No, True/Falst, On/Off MS Access fields as check marks on an ASP page? it would be either checked or unchecked.

View Replies View Related







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