Jump to content
Sign in to follow this  
simoneg

ODBC linking

Recommended Posts

I understood clearly how to import from a OdBC dns but ... I would simply like to connect FM to a ODBC without importing records. With MS Access I would choose to link a form to whatever odbc database. How to do the same with FM ;)

Share this post


Link to post
Share on other sites

Hi Simoneg, Welcome to the forums ;)

To what end?

With access you can actually use the ODBC tables in development as if they were defined in access, in FileMaker this is not yet possible.

In FileMaker the only point of an ODBC connection is to either Execute SQL statements or otherwise Import Records.

Share this post


Link to post
Share on other sites

I also had that question.

But here's another that can also be useful for Simoneg: how do you exactly insert the SQL-statement into a field. Step-by-step.

Share this post


Link to post
Share on other sites

how do you exactly insert the SQL-statement into a field. Step-by-step.

Hmmm, don't follow?

Share this post


Link to post
Share on other sites

Well, if you want to execute a query, you need to use the 'execute sql' script. But how can you use or manipulate the ouput of that query?

How can you put the result of an sql-query into a field or something?

Share this post


Link to post
Share on other sites

Depends on what you're doing

Insert, Update, Delete statements -- none return anything in SQL unless they fail in which case an ODBC error will be thrown.

With Select... Well that's another story, in that case you don't use execute sql[] but instead import records -- I.e. if you want to check for a a record

Go To Layout[ some layout based on a one field table ]

Delete All Records[No Dialog]

Import Records[ ODBC ; Select Id From Users Where Id = 5 ]

If[ Get(FoundCount) > 0 and Get(LastODBCError) = 0]

# Do what you want if record exists

Else If[ Get(LastODBCError) > 0 ]

# Do What you want if an odbc error is thrown

Else

# Do what you want if no records found

End If

Go To Layout[ original layout ]

Share this post


Link to post
Share on other sites

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
Sign in to follow this  

×

Important Information

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