Database - functionality for front end application

Melvin Cox melcox at
Sun Nov 16 01:43:43 EST 2003

I am evaluating Runtime Revolution, but have been growing increasingly 
frustrated in attempting to build the shell for a front end database 

Although I have been successful in connecting to a local database via ODBC, 
I have run into numerous difficulties implementing certain on-form 

The data entry/query form that I am attempting to build accesses information 
from two primary tables: People and Business. The schemas of these tables 
are as follows:


People Table

Pid  <unique primary key>
CompanyName < a display only field>

Business Table

Bid <unique primary key>


Problem One: Posting of results from "lookup" query

Whenever a new row is displayed (via Query, Next or Previous calls), or 
whenever an entry or modification is made to the form's Affiliation field, I 
wish to automatically populate the form's (display only) CompanyName field 
with the results of the following SQL query:

select Org_Name from Business where Bid = "<value of the form's currently 
displayed affiliation field>"

How can this best be accomplished in Revolution?

[Note: I do not understand the process by which the currently value of a 
field is captured and used as a variable within a SQL query].

Problem Two: Placing the current time into a field

Just prior to an insert or update of any row, I wish to populate the form's 
Last_update field with a datetime value reflecting the current date and time 
(ie. "2003-11-14 13:17:39.250").

How can this best be implemented?

Problem Three: Forcing All Caps

To insure data integrity, my application design requires entry of data into 
the "Pid" field in UPPER CASE format.

While I have been successful in limiting the length of the data entered in 
this field to ten (10) characters or less, my attempts to force 
CAPITALIZATION have to date failed.  The following script is currently 
applied to the field:


on keyDown theKey
  if the length of me >= 10 then beep
  else pass keyDown
end keyDown


Any assistance in these areas is most sincerely appreciated.

Melvin Cox
BCM Productions

Frustrated with dial-up? Get high-speed for as low as $26.95. (Prices may vary by service area.)

More information about the Use-livecode mailing list