Lua Samples
--------------
1 Lua Sample Files Purpose
2 How to install Lua on UNIX/LINUX
3 How to install Lua on Windows
4 How to Run Lua Samples

1 Lua Sample Files Purpose
-----------------------------
   This directory contains some Lua examples which illustrate 
   how to use Lua DBAPI(luasql) to connect DBMaster.

   luasample.lua        ==>Connect DBMaster from ODBC. Insert,updata,delete,
                                           select data via luasql. 

2 How to install Lua and luasql on UNIX/LINUX
-------------------------------------
   (1) download Lua-5.1.tgz (primary source code)
       
       please reference http://www.lua.org/

   (2) build Lua
   
           Building Lua on Unix systems should be very easy. First do "make" and
           see if your platform is listed. If so, just do "make xxx", where xxx
           is your platform name. The platforms currently supported are:
                ansi bsd generic linux macosx mingw posix solaris
           for example: make linux             
           
   (3) install Lua
   
           Once you have built Lua, you may want to install it in an official
           place in your system. In this case, do "make install". The official
           place and the way to install files are defined in Makefile. You must
           have the right permissions to install files.

           If you want to build and install Lua in one step, do "make xxx install",
           where xxx is your platform name.

           If you want to install Lua locally, then do "make local". This will
           create directories bin, include, lib, man, and install Lua there as
           follows:

             bin:      lua luac
             include:  lua.h luaconf.h lualib.h lauxlib.h lua.hpp
             lib:      liblua.a
             man/man1: lua.1 luac.1

           These are the only directories you need for development.

           There are man pages for lua and luac, in both nroff and html, and a
           reference manual in html in doc, some sample code in test, and some
           useful stuff in etc. You don't need these directories for development.

           If you want to install Lua locally, but in some other directory, do
           "make install INSTALL_TOP=xxx", where xxx is your chosen directory.             
           
   (2) install luasql
 
       For more information and resource, please reference 
       http://www.koders.com

3 How to install Lua on Windows
----------------------------------
   (1) If you're not using the usual Unix tools, then the instructions for
           building Lua depend on the compiler you use. You'll need to create
           projects (or whatever your compiler uses) for building the library,
           the interpreter, and the compiler, as follows:
        
           library:     lapi.c lcode.c ldebug.c ldo.c ldump.c lfunc.c lgc.c llex.c
                        lmem.c lobject.c lopcodes.c lparser.c lstate.c lstring.c
                        ltable.c ltm.c lundump.c lvm.c lzio.c
                        lauxlib.c lbaselib.c ldblib.c liolib.c lmathlib.c loslib.c
                        ltablib.c lstrlib.c loadlib.c linit.c
        
           interpreter: library, lua.c
        
           compiler:    library, luac.c print.c
        
           If you use Visual Studio .NET, you can use etc/luavs.bat
           in its "Command Prompt".
        
           If all you want is to build the Lua interpreter, you may put all .c files
           in a single project, except for luac.c and print.c. Or just use etc/all.c.
        
           To use Lua as a library in your own programs, you'll need to know how to
           create and use libraries with your compiler.
        
           As mentioned above, you may edit luaconf.h to select some features before
           building Lua.
           
   (2) install luasql
 
       For more information and resource, please reference 
       http://www.koders.com
       
4 How to Run Lua Samples
---------------------------
   (1) To run this samples, firstly start the DBMaster sample database:
       dmserver dbsample5
       
   (2) Then run the programs by typing
       lua luasample.lua
