Quantcast
Channel: Liquibase Forums
Viewing all articles
Browse latest Browse all 2993

Re : Multiple inserts in sqlFile do not fail as expected

$
0
0
Guys I know how to solve this problem
JDBC driver has a very interesting feature: when you execute command containing multiple statements, driver returns only the result of the first statement (resultset for SELECT statement and true/false for other types of statements). If you want to know the results of other statements you should use getMoreResults method of Statement, Resultset or Connection class. And if the error occurs, this method throws an exception. And you should use this method in a cycle until it stops to return new results.
I saw the liquibase code, there is no such an approach implemented. So, my suggestion is to implement this one. I could do it myself via the pull request
I've tested such a way of getting errors against SQL Server JDBC driver and it works out just fine

Viewing all articles
Browse latest Browse all 2993

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>