Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

siw2odbc: SQL Insert fails with single quotes in data

#1

When running siw2odbc-x64 on a new mysql database, the insert fails with the following:

Processing [Battery and Power Policy]
SiwODBC.cpp-470 SiwODBC::HandleDiagnosticRecord DSN=[SIW] RETCODE=-1
INSERT INTO siw_Scheduled_Tasks_Properties (siw_computer_id, siw_property_id, siw_detail_id, siw_Property, siw_Value) VALUES (33, 106, 4, 'Description', 'This task updates the cached list of folders and the security permissions on any new files in a userÆs shared media library.')
Datasource: [SIW] [MariaDB ODBC 3.0 Driver] [MariaDB 10.00.000033 siw][42000] [ma-3.0.2][10.0.33-MariaDB]You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 's shared media library.')' at line 1 (1064)
DSN=[SIW] RETCODE=-1
INSERT INTO siw_Battery_Power_Policy_Properties (siw_computer_id, siw_property_id, siw_detail_id, siw_Property, siw_Value) VALUES (33, 6, 2, 'Description', 'Saves energy by reducing your computerÆs performance where possible.')
Datasource: [SIW] [MariaDB ODBC 3.0 Driver] [MariaDB 10.00.000033 siw]
SiwODBC.cpp-486 SiwODBC::HandleDiagnosticRecord [42000] [ma-3.0.2][10.0.33-MariaDB]You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 's performance where possible.')' at line 1 (1064)
Processing [Printers]

After removing the apostrophe in the last field on both lines, the insert works OK.

Further note: the mysql database sql file that creates the tables creates many of them with lower case characters on the begging of the word, such as siw_bios_properties instead of siw_BIOS_Properties. After renaming the tables, all works OK.
Reply


Messages In This Thread
siw2odbc: SQL Insert fails with single quotes in data - by northsoundtech - 11-25-2017, 02:00 AM
RE: siw2odbc: SQL Insert fails with single quotes in data - by gtopala - 11-25-2017, 08:49 AM
RE: siw2odbc: SQL Insert fails with single quotes in data - by northsoundtech - 11-26-2017, 01:21 AM



Users browsing this thread: 1 Guest(s)