Groups | Blog | Home
all groups > sql server programming > september 2003 >

sql server programming : An apostrophe is messing me up (there has to be another way)



Fox
9/1/2003 10:19:16 PM
The variable
SelectedTournament
will sometimes have an apostrophe within it.
When it does I get a 500 server error.
There have been some suggestions on how to
deal with this, such as doubling the single quotes
but there is no place to do this. Is there another
way to fix this right within the query itself ?

" SELECT DivNumber,DivRank,DivAge,DivGender "
" FROM FSTPoints WHERE TournamentName = '" & SelectedTournament & "' AND
DivNumber = "
& iterate & ";"

Fox
9/2/2003 12:30:06 AM
You are a life saver. I spent all day on this and really
did not have the time to spend. Must push on with
a lot to do.

The weird thing is I read about this REPLACE command
just the other day, but did not relate it to this instance.
Thanks for the pointer.

Something I've been working on for free is now becoming
a small but definite commercial success in a relatively small niche,
but with a bit of potential. I need to find someone on a
consulting basis because I am limited and can get hung up
easily on small points. To really capture this market I have
to get on with it quickly. And yes it is VBScript !
Are you interested ? You may be way out of my league
most everyone is (G)

Fox

[quoted text, click to view]

Michael Culley
9/2/2003 1:22:28 PM
I presume this is VB. Just do

[quoted text, click to view]

--
Michael Culley


[quoted text, click to view]

AddThis Social Bookmark Button