HI form France!
I really need to create a form based on a SQL statement (select…) instead of a single table!!!
how can I accomplish this miracle???
best regards
HI form France!
I really need to create a form based on a SQL statement (select…) instead of a single table!!!
how can I accomplish this miracle???
best regards
Re: How to create a form based on a SQL statement (scriptcase v:4.00.0037)
Hello,
No, you cant use the SQL Statement in Form, when you create a new form.
But you can use the macro sc_change_connection.
Re: How to create a form based on a SQL statement (scriptcase v:4.00.0037)
A form is based on a single table X. But you can add custom fields that are in other tables (related to table X). Takes a bit more coding however. You’ll have to create code for populating the custom fields and for updating data in these fields into the database. It can be done by an experienced scriptcase developer.
Re: How to create a form based on a SQL statement (scriptcase v:4.00.0037)
But you can create the application, a table / view to select or enter an SQL query.
I work with MySQL. because SC can only log into a database anyway. But I work with several databases (schema) so I have a scheme in which I remove only the views that I use in SC. Finally, it does not matter whether you live in SC or in the database port. The variant is here in my opinion better.
Re: How to create a form based on a SQL statement (scriptcase v:4.00.0037)
Yep, I would create a SQL view and use that as your ‘table’
Regards,
Scott.
Re: How to create a form based on a SQL statement (scriptcase v:4.00.0037)
A standard view will work when no data manipulation is required. If you need to insert/update/delete in the form, you cannot use a view. In an Oracle database however you can, but you need to create INSTEAD OF triggers on the view. I’m not sure if these are available in MYSQL.
Re: How to create a form based on a SQL statement (scriptcase v:4.00.0037)
A standard view will work when no data manipulation is required.
I believed this was understood. You will have to create your own form and manage the updates yourself by creating your own submit button and bypass the defaults. Sometimes you have to go past the cookie cutter solutions that are provided by default.
Regards,
Scott.