/*
* This software and supporting documentation were developed by
*
* Siemens Corporate Technology
* Competence Center Knowledge Management and Business Transformation
* D-81730 Munich, Germany
*
* Authors (representing a really great team ;-) )
* Stefan B. Augustin, Thorbj�rn Hansen, Manfred Langen
*
* This software is Open Source under GNU General Public License (GPL).
* Read the text of this license in LICENSE.TXT
* or look at www.opensource.org/licenses/
*
* Once more we emphasize, that:
* THIS SOFTWARE IS MADE AVAILABLE, AS IS, WITHOUT ANY WARRANTY
* REGARDING THE SOFTWARE, ITS PERFORMANCE OR
* FITNESS FOR ANY PARTICULAR USE, FREEDOM FROM ANY COMPUTER DISEASES OR
* ITS CONFORMITY TO ANY SPECIFICATION. THE ENTIRE RISK AS TO QUALITY AND
* PERFORMANCE OF THE SOFTWARE IS WITH THE USER.
*
*/
package mod.tsql;
// Tsql.java
import mod.tsql.TsqlInterpreter;
import java.io.IOException;
/** Our improved version of `isql�.
*
* <P>See `TsqlInterface� for documentation of interactive usage.</P>
*
* <P>See `example� for an example of using Tsql from Java.</P>
*/
public class Tsql
{
static public void main(String[] aArgs)
throws IOException
{
TsqlInterpreter tTsql = new TsqlInterpreter();
tTsql.handleMain(aArgs);
}
/** Example of using Tsql from Java. */
static public void example()
throws IOException
{
TsqlInterpreter tTsql = new TsqlInterpreter();
tTsql.initialize(new String[] {
"-S", "jdbc:sybase:Tds:junkie.base.de:5678/MyDB",
"-U", "User",
"-P", "Pass"
});
tTsql.execute(
"select count(*) from members\n"
+ "select nick, authtype from members where nick like 'name%'\n"
+ "!echo End of test.\n");
}
}