Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public class CallableStatementTest extends AbstractTest {
.escapeIdentifier(RandomUtil.getIdentifier("streamGetterSetterProc"));
private static String tvpProcName = AbstractSQLGenerator
.escapeIdentifier(RandomUtil.getIdentifier("TVPProc"));
private static String tvpTypeName = "TVPType";
private static String tvpTypeName = RandomUtil.getIdentifier("TVPType");

/**
* Setup before test
Expand Down Expand Up @@ -1135,8 +1135,8 @@ public void testCallableStatementParameterNameAPIs() throws Exception {
}
try (Statement stmt = connection.createStatement()) {
// Create a TVP type and procedure if not exists
stmt.execute("CREATE TYPE " + tvpTypeName + " AS TABLE (id INT)");
stmt.execute("CREATE PROCEDURE " + tvpProcName + " @tvp " + tvpTypeName + " READONLY, @val XML = NULL OUTPUT AS SELECT 1");
stmt.execute("CREATE TYPE " + AbstractSQLGenerator.escapeIdentifier(tvpTypeName) + " AS TABLE (id INT)");
stmt.execute("CREATE PROCEDURE " + tvpProcName + " @tvp " + AbstractSQLGenerator.escapeIdentifier(tvpTypeName) + " READONLY, @val XML = NULL OUTPUT AS SELECT 1");
}

try (SQLServerCallableStatement cs = (SQLServerCallableStatement) connection.prepareCall("{call " + tvpProcName + " (?, ?)}")) {
Expand Down
Loading