« RegEx Speed Test | Home | MBS Real Studio Plugi… »

Create fields in Filemaker database from a Script


Just a quick note: You can create/remove fields form a Filemaker database using scripts. A call like this creates a new field:

MBS("FM.ExecuteSQLOnIdle";"ALTER TABLE TestTable ADD MyField varchar")

We change the table TestTable and add a new field called MyField with type text (varchar).
Also you can remove a field:

MBS("FM.ExecuteSQLOnIdle";"ALTER TABLE TestTable DROP COLUMN MyField")

It is important to use FM.ExecuteSQLOnIdle to avoid a deadlock. So only when the database is not in use (at idle time), you can change it. For next plugin prerelease we updated FM.ExecuteSQL.LastErrorMessage to also report error messages from FM.ExecuteSQLOnIdle.
24 02 13 - 17:47
No comments

  
Remember personal info?

Emoticons / Textile


Notify:
Hide email:

Small print: All html tags except <b> and <i> will be removed from your comment. You can make links by just typing the url or mail-address.