HP3000-L Archives

October 2000, Week 2

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Dave Darnell <[log in to unmask]>
Reply To:
Dave Darnell <[log in to unmask]>
Date:
Thu, 12 Oct 2000 10:19:04 -0600
Content-Type:
text/plain
Parts/Attachments:
text/plain (50 lines)
Although I'm not familiar with the SQL syntax standards to be sure, I have
for many years relied on other systems, software, and languages to interpret
two delimiter characters together as an "escaped" single literal character.
You could test this by entering into your present version of the user
program the string (without my double quotes) "this doesn''t work"

> -----Original Message-----
> From: Tom Brandt [mailto:[log in to unmask]]
> Sent: Thursday, October 12, 2000 9:59 AM
> To: Dave Darnell; [log in to unmask]
> Subject: Re: SQL INSERT statement syntax
>
>
> I am not sure how that would solve the problem.  Would not
> the first single
> quote it saw look like the end of the string - even though it is not?
>
> At 10:09 AM 10/12/2000 -0600, Dave Darnell wrote:
> >I'm not sure about using other delimiters, but would it not
> work ti parse
> >the input string for the single quote and change it to two
> single quotes?
> >
> > > -----Original Message-----
> > > From: Tom Brandt [mailto:[log in to unmask]]
> > > Sent: Thursday, October 12, 2000 9:48 AM
> > > To: [log in to unmask]
> > > Subject: SQL INSERT statement syntax
> > >
> > >
> > > I am using SQL to insert a row into a table, with the
> > > following syntax:
> > >
> > > INSERT INTO Survey VALUES ('<val1>', '<val2>',
> '<val3>',...'<valn>')
> > >
> > > I am using a single quote (') to delimit text strings.   The
> > > problem is
> > > that if a user types a single quote into one of the fields,
> > > the result is
> > > something like 'This does'nt work'.  The single quote
> looks the ending
> > > delimiter of the string, and confuses SQL.
> > >
> > > Can I use other delimiters besides single or double quotes to
> > > delimit text
> > > strings?
> > >
>

ATOM RSS1 RSS2