The Mimer SQL Mobile database server that runs on your handheld device has a very small footprint. This is achieved by creating and storing precompiled statements that give you access to the data stored on your device.
For example, to store the statement: SELECT col1,col2 FROM tab, you would use the SQL command CREATE STATEMENT as follows:
CREATE STATEMENT sel1 SELECT col1, col2 FROM tab
The statement, named sel1, is stored in the database. When you run your application it executes the following statement:
EXECUTE STATEMENT sel1
The same method is used for all types of data manipulation statements and calls to stored procedures.
The following are examples of precompiled SQL statements:
CREATE STATEMENT ins1 INSERT INTO tab(col1, col2) VALUES('ABC', :col2_value)
CREATE STATEMENT upd1 UPDATE tab SET col2=col2 + 10
WHERE col1 = :hw_col1
CREATE STATEMENT proc1 CALL proc('ABC', 10, 20)
The INSERT statement, ins1, inserts the string 'ABC' into col1. The second parameter, :col2_value, is a parameter marker and is represented by a host variable in an application program.
Tip: As size is of great consequence on any handheld device, you should minimize the size of the database by removing objects that are not needed.
In the example environment, if you chose to install it, there are a number of precompiled statements ready for use which you can review on your workstation.