<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Getting Started with External SQL Sources</title>
	<atom:link href="http://sixfriedrice.com/wp/getting-started-with-external-sql-sources/feed/" rel="self" type="application/rss+xml" />
	<link>http://sixfriedrice.com/wp/getting-started-with-external-sql-sources/</link>
	<description>smart business solutions</description>
	<lastBuildDate>Fri, 10 Sep 2010 15:15:59 -0500</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Geoff Coffey</title>
		<link>http://sixfriedrice.com/wp/getting-started-with-external-sql-sources/comment-page-1/#comment-1654</link>
		<dc:creator>Geoff Coffey</dc:creator>
		<pubDate>Sat, 07 Feb 2009 17:08:31 +0000</pubDate>
		<guid isPermaLink="false">http://sixfriedrice.com/wp/getting-started-with-external-sql-sources/#comment-1654</guid>
		<description>Max:

If you look at the result of your calculation in the data viewer, you&#039;ll see output like this:

&lt;pre&gt;&lt;code&gt;
INSERT INTO contact_test (last_name) VALUES (Bill)
&lt;/code&gt;&lt;/pre&gt;

This is almost perfect, but you need to quote the first name. The formula to do that would look like this (hard to read!):

&lt;pre&gt;&lt;code&gt;
&quot;INSERT INTO contact_test (last_name) VALUES (&#039;&quot; &amp; people::fname &amp; &quot;&#039;)&quot;
&lt;/code&gt;&lt;/pre&gt;

Which yields:

&lt;pre&gt;&lt;code&gt;
INSERT INTO contact_test (last_name) VALUES (&#039;Bill&#039;)
&lt;/code&gt;&lt;/pre&gt;

Unfortunately, a single quote next to a double quote in the FileMaker calculation dialog can be exceptionally hard to see, which makes writing calculations like this error prone. To solve this, we use a handful of custom functions. For example:

&lt;pre&gt;&lt;code&gt;
SqlString(value, nullIfEmpty) :=
   if (IsEmpty(value) and nullIfEmpty; &quot;NULL&quot;; &quot;&#039;&quot; &amp; Substitute(value, &quot;&#039;&quot;, &quot;\\&#039;&quot;) &amp; &quot;&#039;&quot; )
&lt;/code&gt;&lt;/pre&gt;

Now your calculation can look like this:

&lt;pre&gt;&lt;code&gt;
&quot;INSERT INTO contact_test (last_name) VALUES (&quot; &amp; SqlString(people::fname, false) &amp; &quot;)&quot;
&lt;/code&gt;&lt;/pre&gt;

Which, to my eye, is much easier to read (and therefore less error prone).

Hope it helps,

Geoff</description>
		<content:encoded><![CDATA[<p>Max:</p>
<p>If you look at the result of your calculation in the data viewer, you&#8217;ll see output like this:</p>
<pre><code>
INSERT INTO contact_test (last_name) VALUES (Bill)
</code></pre>
<p>This is almost perfect, but you need to quote the first name. The formula to do that would look like this (hard to read!):</p>
<pre><code>
"INSERT INTO contact_test (last_name) VALUES ('" &#038; people::fname &#038; "')"
</code></pre>
<p>Which yields:</p>
<pre><code>
INSERT INTO contact_test (last_name) VALUES ('Bill')
</code></pre>
<p>Unfortunately, a single quote next to a double quote in the FileMaker calculation dialog can be exceptionally hard to see, which makes writing calculations like this error prone. To solve this, we use a handful of custom functions. For example:</p>
<pre><code>
SqlString(value, nullIfEmpty) :=
   if (IsEmpty(value) and nullIfEmpty; "NULL"; "'" &#038; Substitute(value, "'", "\\'") &#038; "'" )
</code></pre>
<p>Now your calculation can look like this:</p>
<pre><code>
"INSERT INTO contact_test (last_name) VALUES (" &#038; SqlString(people::fname, false) &#038; ")"
</code></pre>
<p>Which, to my eye, is much easier to read (and therefore less error prone).</p>
<p>Hope it helps,</p>
<p>Geoff</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: max</title>
		<link>http://sixfriedrice.com/wp/getting-started-with-external-sql-sources/comment-page-1/#comment-1653</link>
		<dc:creator>max</dc:creator>
		<pubDate>Sat, 07 Feb 2009 16:58:02 +0000</pubDate>
		<guid isPermaLink="false">http://sixfriedrice.com/wp/getting-started-with-external-sql-sources/#comment-1653</guid>
		<description>I agree with Ned - this is exactly what Ive been trying to do using scripting, EXECUTE SQL -&gt; calculated SQL text - with syntax thats looks like &quot;INSERT INTO contact_test (last_name) VALUES (&quot; &amp; people::fname &amp;&quot;)&quot; - where the first part is the destination table and fields within MYSQL and the values are coming from my local FM table.

One way or another I cant get the exact syntax correct. I have it sending the SQL to MYSQL but I always get a MYSQL error coming back - it has something to do with the use of &amp;&#039;s and single and double quotes. 

Once I get it right I will make another post - likewise if anyone has got it right please let us know.</description>
		<content:encoded><![CDATA[<p>I agree with Ned &#8211; this is exactly what Ive been trying to do using scripting, EXECUTE SQL -&gt; calculated SQL text &#8211; with syntax thats looks like &#8220;INSERT INTO contact_test (last_name) VALUES (&#8221; &amp; people::fname &amp;&#8221;)&#8221; &#8211; where the first part is the destination table and fields within MYSQL and the values are coming from my local FM table.</p>
<p>One way or another I cant get the exact syntax correct. I have it sending the SQL to MYSQL but I always get a MYSQL error coming back &#8211; it has something to do with the use of &amp;&#8217;s and single and double quotes. </p>
<p>Once I get it right I will make another post &#8211; likewise if anyone has got it right please let us know.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Josh O.</title>
		<link>http://sixfriedrice.com/wp/getting-started-with-external-sql-sources/comment-page-1/#comment-969</link>
		<dc:creator>Josh O.</dc:creator>
		<pubDate>Fri, 29 Feb 2008 19:38:57 +0000</pubDate>
		<guid isPermaLink="false">http://sixfriedrice.com/wp/getting-started-with-external-sql-sources/#comment-969</guid>
		<description>@Ned
In case you didn&#039;t get your answer.  This article focuses on the manipulation of data in a SQL database...via a FileMaker interface.  Data stored in SQL, but changed using FileMaker.

Going the other way, Data in FileMaker and replicated in SQL is an entirely different beast.  It is definitely possible.  I am not sure it&#039;s easy, not having worked with it too much, but possible.

Unless anyone else has any other ideas, I would look at the SQL commands from FileMaker.  You may be able to set either SEND, POST, OR EXPORT commands to get your data from FMP to SQL.  Exact procedure will depend on the version of SQL you are using.

There are a number of plugins also available to automate the migration of data between the two.  Trying Google-ing data migration with FileMaker and SQL.  That should get you moving in the right direction.</description>
		<content:encoded><![CDATA[<p>@Ned<br />
In case you didn&#8217;t get your answer.  This article focuses on the manipulation of data in a SQL database&#8230;via a FileMaker interface.  Data stored in SQL, but changed using FileMaker.</p>
<p>Going the other way, Data in FileMaker and replicated in SQL is an entirely different beast.  It is definitely possible.  I am not sure it&#8217;s easy, not having worked with it too much, but possible.</p>
<p>Unless anyone else has any other ideas, I would look at the SQL commands from FileMaker.  You may be able to set either SEND, POST, OR EXPORT commands to get your data from FMP to SQL.  Exact procedure will depend on the version of SQL you are using.</p>
<p>There are a number of plugins also available to automate the migration of data between the two.  Trying Google-ing data migration with FileMaker and SQL.  That should get you moving in the right direction.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ned Diddry</title>
		<link>http://sixfriedrice.com/wp/getting-started-with-external-sql-sources/comment-page-1/#comment-941</link>
		<dc:creator>Ned Diddry</dc:creator>
		<pubDate>Mon, 21 Jan 2008 17:33:48 +0000</pubDate>
		<guid isPermaLink="false">http://sixfriedrice.com/wp/getting-started-with-external-sql-sources/#comment-941</guid>
		<description>Why does *nobody* ever talk about data going the *other* way: getting data from Filemaker *to* a(n) SQL database? It seems impossible that this can be a &quot;one way street,&quot; but a friend of mine and I have been trying for two weeks to have edits to a Filemaker DB get reflected in a remote SQL DB that is feeding web pages, and it is so esoteric as to be next to impossible. The one time we came close it was like watching paint dry it was so slow.

Is there no way to do this without repeatedly exporting the entire DB every time there is an edit or change to a found Filemaker set of data?

It seemed from all the hype like this would be easy, but so far it&#039;s entirely defeated us.

Denriddy</description>
		<content:encoded><![CDATA[<p>Why does *nobody* ever talk about data going the *other* way: getting data from Filemaker *to* a(n) SQL database? It seems impossible that this can be a &#8220;one way street,&#8221; but a friend of mine and I have been trying for two weeks to have edits to a Filemaker DB get reflected in a remote SQL DB that is feeding web pages, and it is so esoteric as to be next to impossible. The one time we came close it was like watching paint dry it was so slow.</p>
<p>Is there no way to do this without repeatedly exporting the entire DB every time there is an edit or change to a found Filemaker set of data?</p>
<p>It seemed from all the hype like this would be easy, but so far it&#8217;s entirely defeated us.</p>
<p>Denriddy</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Geoff Coffey</title>
		<link>http://sixfriedrice.com/wp/getting-started-with-external-sql-sources/comment-page-1/#comment-917</link>
		<dc:creator>Geoff Coffey</dc:creator>
		<pubDate>Thu, 20 Dec 2007 16:05:18 +0000</pubDate>
		<guid isPermaLink="false">http://sixfriedrice.com/wp/getting-started-with-external-sql-sources/#comment-917</guid>
		<description>@maximus: I&#039;m finally getting rolling on a real system built with ESS. Once I have this under my belt, I plan to revisit this topic and share my experiences.

Geoff</description>
		<content:encoded><![CDATA[<p>@maximus: I&#8217;m finally getting rolling on a real system built with ESS. Once I have this under my belt, I plan to revisit this topic and share my experiences.</p>
<p>Geoff</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Maximus</title>
		<link>http://sixfriedrice.com/wp/getting-started-with-external-sql-sources/comment-page-1/#comment-916</link>
		<dc:creator>Maximus</dc:creator>
		<pubDate>Thu, 20 Dec 2007 07:44:02 +0000</pubDate>
		<guid isPermaLink="false">http://sixfriedrice.com/wp/getting-started-with-external-sql-sources/#comment-916</guid>
		<description>I would like to see a continuation of the topic</description>
		<content:encoded><![CDATA[<p>I would like to see a continuation of the topic</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://sixfriedrice.com/wp/getting-started-with-external-sql-sources/comment-page-1/#comment-394</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Sat, 18 Aug 2007 14:22:16 +0000</pubDate>
		<guid isPermaLink="false">http://sixfriedrice.com/wp/getting-started-with-external-sql-sources/#comment-394</guid>
		<description>With MySQL Connector 3.51.17 installed on Windows Server, the DSN doesn&#039;t give the option for selecting a database. Thus, FileMaker throws an error stating the database &#039; &#039; is invalid. 

With MySQL Connector 3.51.14 installed, the DSN does give the option, however there are now either &quot;comma-in-the-field-name&quot; errors OR the following:

&quot;ODBC Error: [MySQL][ODBC Driver][mysqld-5.0.45]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near &apos;mydatabase`.`mytable` LIMIT 0&apos; at line 1&quot;

What I find particularly interesting is the missing &quot;`&quot; before mydatabase. I have experienced trouble importing data from MS Access Databases without these.</description>
		<content:encoded><![CDATA[<p>With MySQL Connector 3.51.17 installed on Windows Server, the DSN doesn&#8217;t give the option for selecting a database. Thus, FileMaker throws an error stating the database &#8216; &#8216; is invalid. </p>
<p>With MySQL Connector 3.51.14 installed, the DSN does give the option, however there are now either &#8220;comma-in-the-field-name&#8221; errors OR the following:</p>
<p>&#8220;ODBC Error: [MySQL][ODBC Driver][mysqld-5.0.45]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near &apos;mydatabase`.`mytable` LIMIT 0&apos; at line 1&#8243;</p>
<p>What I find particularly interesting is the missing &#8220;`&#8221; before mydatabase. I have experienced trouble importing data from MS Access Databases without these.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Geoff Coffey</title>
		<link>http://sixfriedrice.com/wp/getting-started-with-external-sql-sources/comment-page-1/#comment-278</link>
		<dc:creator>Geoff Coffey</dc:creator>
		<pubDate>Thu, 02 Aug 2007 19:33:27 +0000</pubDate>
		<guid isPermaLink="false">http://sixfriedrice.com/wp/getting-started-with-external-sql-sources/#comment-278</guid>
		<description>@brian: That is a great find. Can anybody else confirm the same? I have seen &lt;em&gt;lots&lt;/em&gt; of reports of this &quot;comma-in-the-field-name&quot; problem.</description>
		<content:encoded><![CDATA[<p>@brian: That is a great find. Can anybody else confirm the same? I have seen <em>lots</em> of reports of this &#8220;comma-in-the-field-name&#8221; problem.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brian Rich</title>
		<link>http://sixfriedrice.com/wp/getting-started-with-external-sql-sources/comment-page-1/#comment-277</link>
		<dc:creator>Brian Rich</dc:creator>
		<pubDate>Thu, 02 Aug 2007 15:44:58 +0000</pubDate>
		<guid isPermaLink="false">http://sixfriedrice.com/wp/getting-started-with-external-sql-sources/#comment-277</guid>
		<description>@steve: I had the same problem with half the field names becoming prefixed with a comma, and the other half not displaying at all. The problem was solved by reverting to the 3.51.14 version of the MySQL ODBC driver; don&#039;t use the latest version 3.51.17. 

In my case, the ODBC connection was on a Windows XP Professional installation (UK), but I don&#039;t know whether that is relevant here.</description>
		<content:encoded><![CDATA[<p>@steve: I had the same problem with half the field names becoming prefixed with a comma, and the other half not displaying at all. The problem was solved by reverting to the 3.51.14 version of the MySQL ODBC driver; don&#8217;t use the latest version 3.51.17. </p>
<p>In my case, the ODBC connection was on a Windows XP Professional installation (UK), but I don&#8217;t know whether that is relevant here.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jesse Antunes</title>
		<link>http://sixfriedrice.com/wp/getting-started-with-external-sql-sources/comment-page-1/#comment-231</link>
		<dc:creator>Jesse Antunes</dc:creator>
		<pubDate>Sun, 22 Jul 2007 05:05:08 +0000</pubDate>
		<guid isPermaLink="false">http://sixfriedrice.com/wp/getting-started-with-external-sql-sources/#comment-231</guid>
		<description>&lt;p&gt;@Ross - Great question. If the file is served, you only have to setup the ODBC connection on the FileMaker server itself.  This is a Sys-Admins Dream!  No more having to duplicate the ODBC connection on each and every box.... It saves loads of time.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>@Ross &#8211; Great question. If the file is served, you only have to setup the ODBC connection on the FileMaker server itself.  This is a Sys-Admins Dream!  No more having to duplicate the ODBC connection on each and every box&#8230;. It saves loads of time.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
