PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: "Angie Lin" <alin at eclipse dot engr dot sgi dot com>
Subject: char or varchar
Date: Feb 26 1996 7:17PM

I have a sybperl script which takes the input from an HTML form and performs an
insertion into my database.  I'm encountering problems with char and varchar
datatypes, however.

Currently, I am manually appending and prepending the quote (') to the string
which I want to insert into the database.  But if the string itself has a quote
('), then the insertion aborts with the error:

    Sybase message 105, Severity 15, state 1
    Line 1
    Unclosed quote before the character string ' ) '.

Likewise, manually appending and prepending the double-quote (") will get me
into the same trouble because my data string might have both single and/or
double-quotes.

What's the solution?  Am I going about this the entirely wrong way by manually
putting the quotes on myself?

Thanks,
Angie