Database - functionality for front end application

Melvin Cox melcox at hotmail.com
Fri Nov 14 18:00:06 EST 2003


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

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

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>
FirstName
LastName
Affiliation
CompanyName < a display only field>
Last_update


Business Table
-------------------

Bid <unique primary key>
Org_Name
Address
City
State
Zip
Last_update

=======================================


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

_________________________________________________________________
Send a QuickGreet with MSN Messenger 
http://www.msnmessenger-download.com/tracking/cdp_games



More information about the use-livecode mailing list