Execute an statemen ( eq procedure) on a database i

Something you want to see in a LiveCode product? Want a new forum set up for a specific topic? Talk about it here.

Moderator: Klaus

Post Reply
Informatie
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 37
Joined: Fri Sep 09, 2011 10:04 am

Execute an statemen ( eq procedure) on a database i

Post by Informatie » Sat Nov 17, 2012 9:10 pm

It would be very nice if you could execute a procedure or function on a database
For example begin Procedure end

Revexecutesql would be perfect
It is in my opinion not nice livecode is not having this feature .

I can use a plugin be standard livecode would be mice

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Execute an statemen ( eq procedure) on a database i

Post by Mark » Sun Nov 18, 2012 10:58 pm

Hi,

There are a few options. You can do what you want with PHP and you can call a PHP script with a URL in LiveCode. Another possibility is using views and triggers in the database. You could do a query on a view without affecting the database. The query would run a trigger, which could be a lengthy SQL script.

Kind regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

Informatie
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 37
Joined: Fri Sep 09, 2011 10:04 am

Re: Execute an statemen ( eq procedure) on a database i

Post by Informatie » Mon Nov 19, 2012 7:40 pm

Perhaps that is my problem. PHP scripting and URL call is not really my piece of cake.

For one customer I'm not allowed to change the database (SAP BW on ORACLE). I have a readonly account and that is it.

The other customer I have to set the context (user workspace) to retrieve any data at all.
The context is set by executing an PLSQL procedure.

If I would use the trigger approach I have to write many triggers for each different PLSQL execution
If I would ask the DBA he would smile and send me home. Triggers in oracle can be done but it's not done.

a simple "execute immediate" statement would help me in some way.
we can do sqlstatements.

Kind regards DJ

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: Execute an statemen ( eq procedure) on a database i

Post by Mark » Mon Nov 19, 2012 7:46 pm

Contact me "off-list". I have a simple, although commercial, PHP solution that you can ask your customer to install on his server.

Kind regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

Post Reply