11.07.2015 Views

webMathematica™ Wolfram - Wolfram Research

webMathematica™ Wolfram - Wolfram Research

webMathematica™ Wolfram - Wolfram Research

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

data = SQLSelect[conn, {"ROYSCHED"}, headings, SQLColumn["LORANGE"] >limit];108 webMathematica User GuideRoyalty Schedule TableHTMLTableForm[data, TableHeadings -> headings, TableAttributes ->{"cellpadding" -> "0", "cellspacing" -> "0"}]SQLExecute[conn, "SHUTDOWN"];CloseSQLConnection[conn];The code loads DatabaseLink and carries out some processing of an input variable, which isused to select data from the database. It opens a connection to the database and selects datausing the input variable and then formats and prints the result. Finally, it shuts down thedatabase and closes the connection. The shut down instruction is specific to HSQLDB and isnecessary to make sure that the database can be used if the server is restarted.Mathematica Packages and ApplicationswebMathematica provides a way to embed Mathematica code inside HTML. If the amount ofcode is significant, it might be more convenient to place the code into a Mathematica packageand then refer to the package. In addition, a script might be needed to make use of existingMathematica packages or applications. This section discusses how to work with Mathematicacode and packages.Loading PackagesIt is relatively simple to add code that loads a package. Here is a simple example.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!