Jump to content

Execute SQL Function Returned Object?


This topic is 3076 days old. Please don't post here. Open a new topic instead.

Recommended Posts

I think I am missing a fundamental piece.. If I run the following:

Execute SQL [ ODBC Data Source: MySqlDatabase; Calculated SQL Text: "SELECT * FROM Client"] 

And it works, where is the data/object returned?

I am trying to query an external MySql database and check to see if a value exists in a table, and if it does to reurn the uid of that record. But, can seem to get a very simple statment like the above to work?

Link to comment
Share on other sites

You could try setting a variable to Get(LastODBCError) after your query. I haven't tried it, but I wonder if that would give you enough info to at least tell if a record exists.

The script step is kind of a weird one -- it lets you manipulate data in the sql database but not query it. Contrast with the ExecuteSQL calculation, which does the inverse.

If it's a supported version of MySql, you can add tables from the MySql database directly to your FileMaker relationship graph and then use a native FileMaker Find, or use the ExecuteSQL calculation to return the results.

Link to comment
Share on other sites

On the other hand INSERT can use the result of a SELECT (as in any SQL) in the query

http://www.w3schools.com/sql/sql_insert_into_select.asp

But that's all result back into the SQL db from the SQL db and would use the Execute SQL script step. Nothing would be returned to FM except any logs of the transaction if logs are set up in the ODBC DSN (data source name)

Tyra can you provide more details of what you are trying to do?

beverly

Link to comment
Share on other sites

This topic is 3076 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.