Do not let any software impress you!

Only let it convince your intellect.
Slider img 1
Do not look for a business paradise!

It is a waste of time.
Slider img 2
Only yourself can push you uphill.

There is no easy road to prizes.
Slider img 3
Productivity is the name of the game.

And you have to conquer it.
Slider img 4
As long as you understand it,

you will start to build your know-how.
Slider img 5
We can help with that.

We have the tools and the method.
Slider img 6

Embedded SQL in AutoScript



In Mykosmos/BOS, you can use SELECT statements to call data from the database that you will use to a form, to a report, or a script file.
This article shows the code for creating and running a query.
You must close your query inside two commands, start_sql and end_sql.

       start_sql “qname” “KOSMOS”
         SELECT column_name(s)
         FROM table_name
       end_sql
       q = QueryByName(“qname“)
       call TExecute(q)

or (for an unnamed query)

      start_sql “*”“KOSMOS”            
         SELECT column_name(s)                
         FROM table_name
       end_sql       
       q = QueryByName(““)       
       call TExecute(q)

See the example for a parameter query.

In this example, the system will prompts the users to type the name of a town when they run the query

      city = Input(“ Enter Parameter Value ”;” Which Town ? ”;””)
      param = Input(“ bar title ”;” prompt ”;””)

       start_sql “CUSTOMER_LIST” “KOSMOS”
         SELECT CUSTOMER.NAME, CUSTOMER.PHONE, CUSTOMER.TOWN,
                CUSTOMER.ADDRESS
         FROM CUSTOMER
         WHERE CUSTOMER.CITY = :PP
        end_sql
       q = QueryByName(“CUSTOMER_LIST“)
       call TSetParam(q,“PP“,param)
       call TExecute(q)