I've tried parameter substitution as well, but it does not work for me. When
I use session.sqlX ('INSERT INTO TMP(a) VALUES (?)', ['ā']), garbage gets
inserted. Namely, I get "ā" value in the TMP table.
Is there anything else that I should configure, maybe some session
parameter?

Eduard

On 12/5/05, Dittmar, Daniel <[EMAIL PROTECTED]> wrote:
>
> >I have a problem with inserting Unicode characters into MaxDB 7.6 from
> >python.
> >
> >I use a simple statement for testing:
> >INSERT INTO TMP(a) VALUES ('ā')
> >(in case the values() character does not show correctly,
> >that's Latvian a
> >with diacritical mark)
>
> The Python driver currently does support Unicode  only for parameters, not
> in SQL statements.
>
> The solution would be:
> insert = session.prepare ('INSERT INTO TMP(a) VALUES (?)')
> insert.execute (['ā'])
>
> There exists a shortcut if you want to execute the prepared statement only
> once:
> session.sqlX ('INSERT INTO TMP(a) VALUES (?)', ['ā'])
>
>
> http://dev.mysql.com/doc/maxdb/en/26/794c3f0a38e07fe10000000a114084/frameset.htm
>
> Daniel Dittmar
>
> --
> Daniel Dittmar
> SAP Labs Berlin
> [EMAIL PROTECTED]
>

Reply via email to