4 hours ago4 hr Newbies Hello,I'm new to Filemaker and ODBC / SQL updates, but have done this in other languages with no problems. Rewriting an old VFP system into Filemaker... can anyone tell me why this is giving me error 1408? I have a valid DSN."This is in my "SQL Text" box on the "Execute SQL" line of a script:UPDATE SYS_TAB SET F1032 = " & $ln_F1032 & "WHERE ID=1"I've also tried setting another field as the "WHERE":"UPDATE SYS_TAB SET F1032 = " & $ln_F1032 & "WHERE F902 = '00185721' "There's only one record in the SQL table.Thanks.
40 minutes ago40 min I am mostly guessing here (because your description is rather sketchy) but these points stand out:4 hours ago, RCrosier said:This is in my "SQL Text" boxIf you want to incorporate a variable in the SQL statement, you must use the Calculated SQL text option instead of SQL text.4 hours ago, RCrosier said:UPDATE SYS_TAB SET F1032 = " & $ln_F1032 & "WHERE ID=1"This is missing the opening quote before UPDATE and a space (or return) before WHERE.4 hours ago, RCrosier said:"UPDATE SYS_TAB SET F1032 = " & $ln_F1032 & "WHERE F902 = '00185721' "Here too there is no whitespace separating between the variable and the WHERE clause.
11 minutes ago11 min Author Newbies 29 minutes ago, comment said:I am mostly guessing here (because your description is rather sketchy) but these points stand out:If you want to incorporate a variable in the SQL statement, you must use the Calculated SQL text option instead of SQL text.This is missing the opening quote before UPDATE and a space (or return) before WHERE.Here too there is no whitespace separating between the variable and the WHERE clause.Thanks, I had noticed that there wasn't a space in front of the "WHERE" and corrected that, right after I posted this. The missing quote was a copy/paste problem.Since I posted this question, I found/realized that I can update the SQL tables using FileMaker commands, which AI kept telling me I could NOT do... I tried a small experiment and it worked, so I think I'm good now, without trying to figure out why my SQL is not working with the ODBC for now.Oh, and I did try the Calculated SQL text option as well, same/similar errors. Edited 10 minutes ago10 min by RCrosier
Create an account or sign in to comment