SQL和Filemaker Pro 13协同工作 [英] SQL and Filemaker Pro 13 working together

查看:249
本文介绍了SQL和Filemaker Pro 13协同工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到了一个有趣的问题,一个以苹果为中心的用户希望在Filemaker Pro上运行数据库,而我们已经在MS SQL上运行了多个数据库.

I've been handed an interesting question in that an Apple centric user would be keen to run databases on Filemaker Pro and we already have several running on MS SQL.

FM Pro在外观上令人赞叹,并且作为与客户合作的前端看起来不错,但我更喜欢SQL.

FM Pro is visually stunning and as a front end to work with customers would look good, but I'm more SQL at heart.

有人同时使用吗? 您是否可以轻松地在SQL和FM Pro之间运行任务以将数据更新到FM Pro(比如说隔夜)? 是否有人出于任何目的将SQL从FM更改为FM Pro,并认为可以吗?

Does anybody use both? Can you easily run tasks between SQL and FM Pro to update data to FM Pro (say overnight)? Has anybody made the change from SQL to FM Pro for any purpose and found it to be ok?

预先感谢

推荐答案

user4166144 的答案上进行扩展,您可以使用ODBC将MS SQL作为外部数据源添加到FileMaker. (请参阅使用FileMaker Pro,我想创建与MS SQL Server,Oracle或MySQL数据源的实时连接.")

To expand on user4166144's answer a bit, you can add MS SQL as an external data source to FileMaker using ODBC. (See "Using FileMaker Pro, I want to create a live connection to a MS SQL Server, Oracle or MySQL data source.")

这将使您将布局基于MS SQL表,就好像它是本机FileMaker表一样.也就是说,数据将是实时的",无需整夜复制.

This will let you base layouts on an MS SQL table just as though it was a native FileMaker table. That is, the data will be "live", with no need for over-night copying about.

ODBC连接有一些限制,这可能与您的情况无关.通常,FileMaker中的ODBC数据源不能在Manage Database中获得所有FileMaker好东西. ODBC源中的表是影子表".例如,如果您在FileMaker中删除一个字段(列"),则该字段不会在SQL数据库中被删除.但是,创建,编辑和删除记录都可以正常进行.您甚至可以将ODBC源中的表添加到关系图,这是从FileMaker中的多个表中获取数据的主要方式.

There are some limitations to ODBC connections, which will probably be irrelevant in your case. Mostly, ODBC data sources in FileMaker don't get all the FileMaker goodies in Manage Database. Tables from ODBC sources are "shadow tables". For example, if you delete a field ("column") in FileMaker, it doesn't get deleted in the SQL database. However, creating, editing, and deleting records all work as normal. You can even add tables from ODBC sources to the relationship graph, which is the primary way that you get data from multiple tables in FileMaker.

FileMaker有点难以忍受来自SQL背景的知识.它是为了快速开发应用程序而设计的,因此它具有某些范例.这里有几件事我希望能对您有所帮助:

FileMaker is a little hard to wrap your head around coming from an SQL background. It's meant for rapid application development, and as such it has certain paradigms in mind. Here are a few things to know that I hope will help:

  • FileMaker中的每个用户界面(布局")都基于表的出现.布局的主体表示该表出现中的单个记录.每个脚本,计算和相关数据都是从该单个表出现中的单个记录的角度来计算的.也就是说,布局是光标".

  • Every user interface ("Layout") in FileMaker is based on a table occurrence. The body of a layout represents a single record in that table occurrence. Every script, calculation and related piece of data is calculated from the perspective of that single record in that single table occurrence. That is, a layout is a "cursor".

对于关系图,没有(健全的)FileMaker方法可以等效于SQL"OR".

There is no (sane) FileMaker way to do the equivalent of an SQL "OR" when it comes to the Relationship Graph.

FileMaker 12具有两个名称非常相似的功能.它具有计算功能"ExecuteSQL",该功能使您可以对FileMaker中出现的表运行SELECT语句.包括ODBC源.它还有一个称为"Execute SQL"的脚本步骤,对于在ODBC数据源上运行任意SQL十分方便.后者可能对您非常有用.

FileMaker 12 has two features with very similar names. It has a calculation function "ExecuteSQL", which allows you to run SELECT statements on table occurrences in FileMaker; that includes ODBC sources. It also has a script step called "Execute SQL", which is handy for running arbitrary SQL against an ODBC data source. This latter is probably going to be very useful for you.

以任何一种优雅的方式将SQL查询的结果添加到FileMaker布局上都有些困难.通常,您需要将结果写入全局字段,全局变量或常规字段.如果您想以一种体面的方式显示来自SQL查询的表格数据,则需要生成HTML并将其吐到布局上的Web Viewer元素中的数据url中(即,将HTML前缀为"data:text/html,)

It's somewhat hard to get the results of SQL queries onto FileMaker layouts in any kind of elegant way. Generally, you need to write the results to a global field, a global variable, or a regular field. If you want to display tabular data from an SQL query in a decent kind of way, you will need to generate HTML and spit it into data url in a Web Viewer element on a layout (i.e., prefix the HTML with "data:text/html,")

这篇关于SQL和Filemaker Pro 13协同工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆