L LucianoB Member Licensed User Longtime User Aug 28, 2015 #1 Good day, I have a MSSQL Server and I created a stored procedure which is executed from another program (in VB.NET) and receives one parameter from the same program. Now I want to call the same stored procedure from B4J, sending that parameter as well. I used the following code but it gives me an error: "java.sql.SQLException: The executeQuery method must return a result set." Code: Copy Dim cs As Object = sql1.CreateCallStatement("{call uspAssignNewNumber(?)}", Array(RemarkData.Get(0))) Dim rs As ResultSet = sql1.ExecCall(cs) What am I doing wrong? Thank you
Good day, I have a MSSQL Server and I created a stored procedure which is executed from another program (in VB.NET) and receives one parameter from the same program. Now I want to call the same stored procedure from B4J, sending that parameter as well. I used the following code but it gives me an error: "java.sql.SQLException: The executeQuery method must return a result set." Code: Copy Dim cs As Object = sql1.CreateCallStatement("{call uspAssignNewNumber(?)}", Array(RemarkData.Get(0))) Dim rs As ResultSet = sql1.ExecCall(cs) What am I doing wrong? Thank you
L LucianoB Member Licensed User Longtime User Aug 28, 2015 #2 Well, I found a solution for the above issue. I wrote this code to execute my parametrized stored procedure. Maybe it's a small issue but for me is a little more step learning how to connect B4J to MS SQL. Code: Copy Dim str2 As String = "EXEC uspAssignNewNumber @acserial = " & RemarkData.Get(0) sql1.ExecNonQuery(str2) Upvote 0
Well, I found a solution for the above issue. I wrote this code to execute my parametrized stored procedure. Maybe it's a small issue but for me is a little more step learning how to connect B4J to MS SQL. Code: Copy Dim str2 As String = "EXEC uspAssignNewNumber @acserial = " & RemarkData.Get(0) sql1.ExecNonQuery(str2)