Duncan Booth wrote:
> ...
>
> depending on your actual database you might need to use something other
> than %s to specify the parameters. Check out 'paramstyle' for your
> database connection.
Thank you all for prompt suggestions
I am using firebird 1.5.3 with kinterbasdb
Db
--
http://mail.p
DarkBlue wrote:
> Following is a code snippet from a pythoncard app
> the problem is with the sql string called iq1
> If either mysubject or mytalktext contains an
> apostrophe the update fails :
> Example: mysubject="Let's Eat" this fails
> mysubject="Lets Eat" this works fine
>
> What
DarkBlue wrote:
>
> Example: mysubject="Let's Eat" this fails
> mysubject="Lets Eat" this works fine
>
> What options do I have to avoid this issue but still
> can use apostrophes in my input data ?
Use proper "bind parameters" or "bind variables" when executing the
statement, rather t
DarkBlue> Following is a code snippet from a pythoncard app
DarkBlue> the problem is with the sql string called iq1
DarkBlue> If either mysubject or mytalktext contains an
DarkBlue> apostrophe the update fails :
DarkBlue> Example: mysubject="Let's Eat" this fails
DarkBlue
DarkBlue <[EMAIL PROTECTED]> wrote:
> iq1="update MSGTALK set msgdate='NOW',subject='%s',talktext='%s' where
> msgno= %d " % (mysubject,mytalktext,mymsgno)
> try:
>self.cur.execute(iq1)
Use parameterised queries and get rid of the quotes in the SQL:
iq1="update MSGTALK set msgdate='NOW',sub
Following is a code snippet from a pythoncard app
the problem is with the sql string called iq1
If either mysubject or mytalktext contains an
apostrophe the update fails :
Example: mysubject="Let's Eat" this fails
mysubject="Lets Eat" this works fine
What options do I have to avoid th