Top Experts [
learn more
]
Top 4-10
webko
9743 K
bandmandq
2458 K
Genx
1525 K
4.
tcmeyers
5.
kbata
6.
Martie
7.
Hammerton
8.
rrenfrow
9.
bneeman
10.
plegler
Welcome,
Guest
. Please
login
or
register
.
May 23, 2013, 04:55:10 AM
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search:
Advanced search
Welcome to the FileMaker Web Masters Exchange. If you have any questions about how to use this forum, please watch the getting started movie at:
http://www.fmwebschool.com/movies/forum1/forum1.html
27462
Posts in
6065
Topics by
1523
Members
Latest Member:
donok
fmwebschool.com
General Discussion and Announcements
General Discussion
[SOLVED] SQL trigger to start Filemaker Script Trigger
0 Members and 1 Guest are viewing this topic.
« previous
next »
Pages:
[
1
]
Author
Topic: [SOLVED] SQL trigger to start Filemaker Script Trigger (Read 2370 times)
meryl
Dedicated Database Solutions
Jr. Member
Offline
Posts: 46
Life is good!
[SOLVED] SQL trigger to start Filemaker Script Trigger
[Was worth 50 Kudos points!]
«
on:
July 09, 2009, 09:44:32 AM »
Hi all!
I have a live connection between a Filemaker DB hosted on FMGateway and a SQL DB on another remote server. The layout of the SQL files in the Filemaker DB does not add new records to the Filemaker view of the database automatically as they are created in SQL. After researching as best as I could, I think I need the SQL code and how and where to write it in SQL (I'm obviously not a SQL programmer) that will send a trigger to activate a script trigger in Filemaker 10 to refresh the page. The only other way I know to do this is to have a script run constantly that would refresh, search, or do something to get Filemaker to check for any new records in SQL. I know this would not be a great idea at all.
Could somebody get me going in the right direction or give me a better idea?
Blessings,
Meryl Gullings
Dedicated Database Solutions
Logged
Meryl Gullings
Dedicated Database Solutions
meryl@dedicateddbsolutions.com
Michael Petrov
Chief Software Developer
Administrator
Hero Member
Offline
Posts: 4286
Kudos: 15522
Applications:
BlackBelt
(Guru)
FMTouch
(Guru)
Dolphin Cart Pro
(Guru)
FMStudio
(Guru)
USB Export
(Expert)
IPOST Web
(Expert)
Re: SQL trigger to start Filemaker Script Trigger
«
Reply #1 on:
July 09, 2009, 10:15:31 AM »
Hi Meryl,
This is actually quite a complex question, your best bet is probably to somehow trigger an XML request (through an FMStudio PHP page or something) that would edit a real record in FM - which in turn fires the trigger. The main issue is triggering the PHP page from SQL, which fully depends on the database engine that you are using. I would search for your database engine and the keywords "http request from stored procedure" - typically triggers in SQL are written as stored procedures and the capabilities of hte stored procedures depend on the SQL server itself.
Best Regards,
Michael Petrov
Logged
Michael Petrov,
Chief Software Developer
FMWebschool
800.353.7950
michael@fmwebschool.com
Keep up with our development, follow me on
Twitter
meryl
Dedicated Database Solutions
Jr. Member
Offline
Posts: 46
Life is good!
Re: SQL trigger to start Filemaker Script Trigger
«
Reply #2 on:
July 09, 2009, 12:57:16 PM »
Hi Michael,
Thank you for the quick response!
After reading your post, I wondered if, after the SQL transaction is complete, I put a redirect at the end of the web page just before the "Thank You" web page of the SQL powered site that would go to a web page linked through FMStudio to my Filemaker DB. This page would be hosted on FMGateway with the rest of the Website that I have created. This new PHP page would run the script in Filemaker that refreshes the SQL table in Filemaker and creates a new record in the Order table. My design is for the new Filemaker Solution I have developed be the master for keeping track of the inventory and showing all sales in the original SQL website and the new Filemaker powered website. After starting that Filemaker script, it would redirect the SQL customer back to the SQL Thank You page. Hopefully the customer would never notice.
I would feel much more comfortable with attempting something along this line rather than messing with SQL code which I know nothing about... yet.
Blessings,
Meryl
Dedicated Database Solutions
Logged
Meryl Gullings
Dedicated Database Solutions
meryl@dedicateddbsolutions.com
Michael Petrov
Chief Software Developer
Administrator
Hero Member
Offline
Posts: 4286
Kudos: 15522
Applications:
BlackBelt
(Guru)
FMTouch
(Guru)
Dolphin Cart Pro
(Guru)
FMStudio
(Guru)
USB Export
(Expert)
IPOST Web
(Expert)
Re: SQL trigger to start Filemaker Script Trigger
«
Reply #3 on:
July 09, 2009, 01:52:40 PM »
Hi Meryl,
A much better approach would be to use curl inside of the PHP to call the page instead of a redirect. It is truly as simple as:
Code:
<?php
$ch
=
curl_init
(
'http://yourfullURL'
);
curl_exec
(
$ch
);
?>
That would execute the HTTP call on the web server while the user waits, no redirects that the user can see but the same thing is accomplished.
Best Regards,
Michael Petrov
Logged
Michael Petrov,
Chief Software Developer
FMWebschool
800.353.7950
michael@fmwebschool.com
Keep up with our development, follow me on
Twitter
meryl
Dedicated Database Solutions
Jr. Member
Offline
Posts: 46
Life is good!
Re: SQL trigger to start Filemaker Script Trigger
«
Reply #4 on:
July 09, 2009, 05:44:55 PM »
Hi Michael,
That really makes sense. The original SQL website is written in Cold Fusion so my research tells me I could use cURL in there as well. Do I understand this procedure correctly, the user would never leave the page, cURL would just call my PHP page that would run the script, then the user would go directly to the Thank You page? If so, wouldn't it be even better to run this from the Thank You page?
Blessings,
Meryl
DDS
Logged
Meryl Gullings
Dedicated Database Solutions
meryl@dedicateddbsolutions.com
meryl
Dedicated Database Solutions
Jr. Member
Offline
Posts: 46
Life is good!
Re: [SOLVED] SQL trigger to start Filemaker Script Trigger
«
Reply #5 on:
July 11, 2009, 10:11:58 AM »
Hi Michael,
I wanted to thank you and post one more reply on this string to let future users know how I was able to resolve this.
Apparantely my research wasn't up to par, because my understanding now is that instead of using cURL in Coldfusion, you would use ColdFusion code to do the same thing. You would call a URL in Coldfusion. My friend and Coldfusion expert helped me. I'm not sure of the code exactly, but if anybody needs it, email me and I will be glad to get it for you. from the SQL website "Thank You" page it calls a PHP URL in my Filemaker DB which runs the script to create a new record and then I used the SetField script command for every piece of information I needed to bring into that new order from SQL. The customer from the SQL site never notices.
Thank you Michael!
Blessings,
Meryl
Dedicated Database Solutions
meryl@dedicateddbsolutions.com
Logged
Meryl Gullings
Dedicated Database Solutions
meryl@dedicateddbsolutions.com
Pages:
[
1
]
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General Discussion and Announcements
-----------------------------
=> FMWebschools updates and announcements
===> FMWebschool Training Schedule
=> Newsletter and Community Discussion
=> Webinar and FMWebschool Events
=> General Discussion
===> CDML Old School FileMaker Web Publishing
===> FileMaker Mobile 7/8
=> Holiday Special Product Support
-----------------------------
FMTouch
-----------------------------
=> FMTouch - FileMaker Databases on the iPhone and iPod iTouch
===> FMTouch - Multi Language Discussion
=> FMTouch BlackBerry and FileMaker
-----------------------------
FMStudio
-----------------------------
=> FMStudio
===> FMStudio Connection and Installation Problems
=> FMStudio Pro
-----------------------------
FMWebschool Products and Solutions
-----------------------------
=> Dolphin Shopping Cart System
=> BlackBelt CDML Software
-----------------------------
FileMaker Books
-----------------------------
=> FileMaker Book Questions and Suggestions
-----------------------------
PHP Web Publishing Technologies
-----------------------------
=> FileMaker's New PHP API
=> FileMaker PHP, FX.php custom web publishing
===> Ajax Code and Examples
-----------------------------
FileMaker Inc Products and Technologies
-----------------------------
=> FileMaker Server 9
===> FileMaker Server 7 / 8 Advanced
=> Web Viewer
=> Instant Web Publishing
=> FileMaker XML, XSLT
-----------------------------
Other Resources
-----------------------------
=> Search Engine Optimization and Consulting
===> Marketing Book Reviews
=> FileMaker Web Resources
=> Free JavaScript Code Snips
=> Free PHP Code Snips
=> Web Jobs, Web Consulting
Loading...