On Tue, Feb 05, 2019 at 02:51:42PM +0000, Petr Fischer via Pharo-users wrote:
When I executing this insert SQL command: insert into "TABLE" (..., "VARCHAR_FIELD") values (..., 'ÄÅ¡ÄÅžýáÃéúůÄÅ ÄÅŽÃÃÃÃÃÅ®'); this UDBC error occurs (what's wrong?): Error: "Could not coerce arguments"
Please show complete code.
Below code completes without error.
| db | db := UDBCSQLite3Connection openOn: '/tmp/u.db'. [ db basicExecute: 'create table x (xv varchar)'. db execute: 'insert into x values (?)' with: (Array with: 'ÄÅ¡ÄÅžýáÃéúůÄÅ ÄÅŽÃÃÃÃÃÅ®'). ] ensure: [ db close ]
Yes, via. binding a value ala prepared statement, this works. Thanks! But still... I do not expect anyone to create tables through binding values (like in your example), so following SQL command is still broken: db execute: 'create table A (ID INTEGER, T TEXT DEFAULT ''áÄÅ¡ÅÄá'')'. Error: "Could not coerce arguments" pf