Pergunte aqui

Perfil de jeanDB - atividade

2020-07-27 20:12:38 +0200 Marcada como a melhor resposta syntax error if >1 SET in executeUpdate()

Hello. I am using SQLite via ODBC in Calc/Basic. I am trying to update database records with com.sun.star.sdbc. I can update one field only in a single 'executeUpdate' statement, more than one SET=xxx creates a syntax error and I can't see why. Can anyone advise please?

THIS WORKS:

stmt.executeUpdate("UPDATE statements_ca SET notes = 'uk' WHERE id=2")

THIS WORKS:

stmt.executeUpdate("UPDATE statements_ca SET nominal = 160 WHERE id=2")

But putting both SETs in one statement FAILS:

stmt.executeUpdate("UPDATE statements_ca SET notes = 'uk', SET nominal = 160 WHERE id= 2")

WITH THIS ERROR MESSAGE:

Error 1: An exception occurred Type: com.sun.star.sdbc.SQLException Message: near "SET": syntax error (1). (line : 16

Thanks

2020-07-27 20:11:42 +0200 Medalha recebida  Pergunta famosa (fonte)
2020-07-27 20:11:42 +0200 Medalha recebida  Pergunta notável (fonte)
2020-07-27 20:11:42 +0200 Medalha recebida  Pergunta popular (fonte)
2018-12-06 02:27:09 +0200 Medalha recebida  Pergunta boa (fonte)
2018-07-08 20:07:34 +0200 Medalha recebida  Pergunta famosa (fonte)
2018-05-07 17:59:50 +0200 Medalha recebida  Pergunta notável (fonte)
2018-03-27 17:38:37 +0200 Resposta comentada Calc Protect Cells with Macro

The XML idea is an interesting twist to the plot. Thanks for this. I am going to have a crack at it. jeanDB

2018-03-27 17:36:47 +0200 Medalha recebida  Torcedor (fonte)
2018-03-23 18:40:13 +0200 Medalha recebida  Pergunta popular (fonte)
2018-03-23 17:00:30 +0200 Medalha recebida  Pergunta boa (fonte)
2018-03-23 16:45:07 +0200 Medalha recebida  Estudante (fonte)
2018-03-23 14:46:11 +0200 Perguntou Calc Protect Cells with Macro

Calc Protect Cells with Macro I am trying to implement cell protection using a macro that would work exactly as it does

2018-03-14 08:25:21 +0200 Medalha recebida  Entusiasta
2018-03-12 09:20:17 +0200 Respondeu uma pergunta syntax error if >1 SET in executeUpdate()

Sussed it. Only a single 'SET' required for all field values, not a 'SET' for each field.

2018-03-12 09:09:51 +0200 Perguntou syntax error if >1 SET in executeUpdate()

syntax error if >1 SET in executeUpdate() Hello. I am using SQLite via ODBC in Calc/Basic. I am trying to update data

2016-09-23 11:31:46 +0200 Medalha recebida  Pergunta famosa (fonte)
2015-06-25 06:44:28 +0200 Medalha recebida  Pergunta notável (fonte)
2015-02-25 08:02:33 +0200 Medalha recebida  Pergunta popular (fonte)
2015-02-25 07:26:54 +0200 Respondeu uma pergunta On trying to install extension 'accentuate-1.0.0.oxt' I get an error

Thank you ROSt52. The extension does have the correct .oxt. I have had this extension installed before and it worked fine. Then for some reason I had to uninstall/reinstall LibreOffice and it was from this point that I could not put the 'accentuate' extension back. Anyway, I have been able to install other extensions OK including another accenting extension that does the same job so at least I am able to do what I wanted - use accented characters.

2015-02-21 07:54:29 +0200 Perguntou On trying to install extension 'accentuate-1.0.0.oxt' I get an error

Error Message: Add Extensions(s): C:\users\jon\AppData\Roaming\LibreOffice\4\user\uno_packages\cache\uno_packages\luvmae8.tmp\Accentuate-1.0.0.oxt does not exist.

The oxt file does exist however, in my downloads folder, and this is where I directed libreOffice to get it from. Anyone got any ideas?

LO Version: 4.3.5.2 Writer Windows 7, English