Java Code Examples for

The following examples show how to use These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: elastic-db-tools-for-java   Source File:    License: MIT License 6 votes vote down vote up
public void run() {
    SQLServerPreparedStatement stmt = (SQLServerPreparedStatement) statement;
    try {
        switch (type) {
            // TODO: Add all types
            case Types.STRUCT:
                if (objects.length == 2) {
                    stmt.setStructured(index, (String) objects[0], (SQLServerDataTable) objects[1]);
                throw new RuntimeException("Not Supported yet!",
                        new UnsupportedOperationException(String.format("This SQL Type (%1$s) cannot be added to the statement using this"
                                + " method. Please add the same as an inline parameter at %2$s index.", type, index)));
    catch (SQLServerException ex) {
        throw new RuntimeException(ex);