Created
October 3, 2012 08:44
-
-
Save stubotnik/3825846 to your computer and use it in GitHub Desktop.
Stored Proc return codes in Sequel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def self.return_code_test | |
return_code = @db.synchronize do |conn| | |
stmnt = conn.prepareCall('{ ? = call dbo.sp_tmp_stu_sequel_test() }') | |
stmnt.registerOutParameter(1, java::sql::Types::INTEGER) | |
stmnt.execute | |
# output parameters have not yet been processed, must call getMoreResults() first. | |
stmnt.getMoreResults | |
stmnt.getInt(1) | |
end | |
p "stored proc return code: #{return_code}" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment