Skip to content
No results
We use cookies to ensure that we give you the best experience on our website.

# vendor-specific offline SQL syntax check

SQL syntax check can be done without being connected to the database server and syntax errors can be found before executing SQL on your production database server. Database supports the following: Oracle(PLSQL), SQL Server, MySQL, DB2 and Access.

Code in Java:

    TGSqlParser sqlparser = new TGSqlParser(EDbVendor.dbvoracle);
    sqlparser.sqlfilename  = args[0];

    int ret = sqlparser.parse();
    if (ret == 0){
    System.out.println("Check syntax ok!");
    }else{
    System.out.println(sqlparser.getErrormessage());
    }

Download this demo: Java version, C# version