Skip to content

Commit 2bdabf7

Browse files
committed
getTVPName for storedproc
1 parent feb6a2a commit 2bdabf7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/com/microsoft/sqlserver/jdbc/SQLServerPreparedStatement.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -2136,7 +2136,8 @@ public final void setStructured(int n,
21362136
String getTVPNameIfNull(int n,
21372137
String tvpName) throws SQLServerException {
21382138
if ((null == tvpName) || (0 == tvpName.length())) {
2139-
if (this instanceof SQLServerCallableStatement) {
2139+
// Check if the CallableStatement/PreparedStatement is a stored procedure call
2140+
if(null != this.procedureName) {
21402141
SQLServerParameterMetaData pmd = (SQLServerParameterMetaData) this.getParameterMetaData();
21412142
pmd.isTVP = true;
21422143
try {

0 commit comments

Comments
 (0)