Connecting to Filemaker Server

Creating desktop or client-server database solutions?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

jeffe
Posts: 40
Joined: Thu Sep 27, 2007 12:09 am

Re: Connecting to Filemaker Server

Post by jeffe » Mon Feb 18, 2013 1:26 pm

Hi Bangkok,

After a few sleepless days & nights, I have managed to progress really well.
I am now producing a little stack which hopefully will allow others (Filemaker Community)
to use livecode with a filemaker server.

So far, I have created the following...
My coding might be a little rough so if anyone wants to improve on it
they are more than welcome.

Connect
Disconnect
Add Entry
Delete Entry
Previous Entry
Next Entry
Auto Update modified field

I have one last question, how do I search the database and display the found result.

Many thanks for your help.
Looking forward to contributing back to the community.


jeffe

bangkok
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 937
Joined: Fri Aug 15, 2008 7:15 am

Re: Connecting to Filemaker Server

Post by bangkok » Mon Feb 18, 2013 1:59 pm

jeffe wrote: I have one last question, how do I search the database and display the found result.
You need to learn a few bits of SQL.

It's not too hard for simple queries (on one table only, without any join). Plenty of ressources on the web.

As for the displaying part in LiveCode, you have basically 2 choices :
-a simple text field

-a datagrid (more complex, but much more powerfull and visually attractive)

jeffe
Posts: 40
Joined: Thu Sep 27, 2007 12:09 am

Re: Connecting to Filemaker Server

Post by jeffe » Sun Feb 24, 2013 2:21 pm

Hi Bangkok,

All worked out now... Almost ready to release...
I have one last question.

Do I connect to the database, and then close after every query.
This seems like a slower process, obviously because we are constantly
connecting, closing, connecting and closing again.

or

Do I - on onopenstack "open database"
and - on closestack "close database"

This seems to be alot faster, is there a correct way or does it NOT matter.

Thanks again.


jeffe

bangkok
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 937
Joined: Fri Aug 15, 2008 7:15 am

Re: Connecting to Filemaker Server

Post by bangkok » Mon Feb 25, 2013 12:14 pm

jeffe wrote: Do I connect to the database, and then close after every query.
This seems like a slower process, obviously because we are constantly
connecting, closing, connecting and closing again.

or

Do I - on onopenstack "open database"
and - on closestack "close database"
It depends :
-if your app have to work for a long period of time, then it's better to open and close database, for each operation.
-if not, then of course, better to open just once (in openstack for instance), put the database ID into a global variable, and work with it.

From my experience, with several hours of connexion, there is a risk to get a deconnexion. So that could be a problem.

Last idea, you could add a test after each SQL operation : you test if the result is an "error", if yes, a script can reinitialize the connexion to the DB.

jeffe
Posts: 40
Joined: Thu Sep 27, 2007 12:09 am

Re: Connecting to Filemaker Server

Post by jeffe » Mon Feb 25, 2013 10:34 pm

Hi Bangkok,


Luv the last idea
Thank you for the advise.



jeffe

Post Reply