Sql Query function and Script step

Discussion created by vnp1977 on Mar 6, 2013
Latest reply on Mar 7, 2013 by BowdenData


i'm working on a filemaker solution that use ODBC connection to manage data stored in a mySQL server.

I have not local table in filemaker, just the instance of the tables that exist in mySQL server.

My problem is on a script that simply wants copy many fileds from a relatd record to an other.

So i made a script that require input from the user, than i need to chek the input before perform the UPDATE with the SQL function.

the script step "Execute SQL [No Dialog; ODBC: <datasource name>; <native SQL or calculated SQL>]" is not a problem because i can choose my ODBC connection and find out the right table called in my SQL script.

before this step i have an IF instance that chek if the origin record and the destination record already exist and if i can copy the data from one to the other.


So, the quick way for me is use an other SQL script called inside the IF condition like "SELECT id_a from table2 WHERE categories='test'"


ExecuteSQL(sqlQuery; fieldSeparator; rowSeparator {;arguments...})


the problem is that when i use the "table2" as istance of an ODBC table this function returs always "?" as an error because i think the function not recognize witch ODBC connection it should be use or because the name of the table in this case is not correct.

i tried to apply this function to a local filemaker table an it works without problems

don't work on external table like it not exist.


how i can resolve this??

Thanks a lot