About mixing Database Query Builder with normal database library calls.
Jan Schenkel
janschenkel at yahoo.com
Tue Sep 2 21:54:00 EDT 2003
--- Andre Garzia <soapdog at mac.com> wrote:
> Hi Folks,
>
> I have a couple doubts that revGurus our there might
> clear. I am
> creating a simple app to manage a couple MySQL
> tables. Its the common
> tasks (insertion, modification, deletion), to
> navigate the database I
> am using Database Query Builder, filling fields with
> the data and some
> buttons to navigate. But I cannot use Query Builder
> to insert a Record
> can I? How can I identify what is the current record
> (so that i can
> disable the "previous" and "next" buttons when they
> reach the limits)?
>
> Cheers
> Andre Alves Garzia 2003 BRAZIL
> http://www.soapdog.org
>
Hi Andre,
You can execute any query (INSERT, DELETE, ...) on the
database an existing query connects to, by means of
the following command :
revExecuteWithQuery <name of the existing query>,
<query to execute>
Example :
put "UPDATE customers SET something=123456 ;" into \
tSQLQuery
revExecuteWithQuery "MyCustomerQuery", tSQLQuery
--
As for checking if the current record is the first or
last of the cursor corresponding to a query, use :
revDBQueryIsBOF(<name of the query>
revDBQueryIsEOF(<name of the query>
--
If you want to learn more of the hidden features of
the database query manager and its linked fields and
buttons :
- open the message box
- use the button at the top of the window to go the
Frontscripts section
- click on the checkbox "Show Revolution UI
frontscripts" to hilite it
- in the list above, you'll see a line 'revDatabase'
- double-click it, or select and click the 'Edit this
script' button at the bottom right
Note that it requires a good knowledge of the RevDB
commands and functions, and familiarity with the
message path and how frontScripts intervene.
Hope this helped,
Jan Schenkel.
=====
"As we grow older, we grow both wiser and more foolish at the same time." (La Rochefoucauld)
__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
More information about the use-livecode
mailing list