Forum Discussion

alibaba82's avatar
alibaba82
Super Contributor
14 years ago

(Res) JDBC Request not working in soapUI but works in MS SQL

Hello,
I am using soapUI Pro 3.5, copyright (C) 2007-2009 eviware.com http://www.soapui.org | http://www.eviware.com Build daily-2010-03-18-[1], Build Date 2010/03/18 06:27

I have a jdbc request with
driver: com.microsoft.sqlserver.jdbc.SQLServerDriver
connection string: which works fine when 'test connection' button is used

SQL Query
DECLARE @RC int
DECLARE @Locale nvarchar(5)
DECLARE @InterfacePartnersRolesId INT
DECLARE @ListGroupName NVARCHAR(255)
SET @ListGroupName = 'Liquid Recommendation List'
SET @InterfacePartnersRolesId = 3
SET @Locale = 'en-US'
EXECUTE @RC = [dbo].[usp_cps_GetRecommendationLists]  @ListGroupName, @Locale, @InterfacePartnersRolesId

in SQL Server I have no issues and can see the response
in soapUI, I get the following error.

Thu Mar 18 13:09:26 PDT 2010:ERROR:com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near '{'.
  com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near '{'.
  at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(Unknown Source)
  at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(Unknown Source)
  at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(Unknown Source)
  at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(Unknown Source)
  at com.microsoft.sqlserver.jdbc.TDSCommand.execute(Unknown Source)
  at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(Unknown Source)
  at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(Unknown Source)
  at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(Unknown Source)
  at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.execute(Unknown Source)
  at com.eviware.soapui.impl.wsdl.panels.teststeps.JdbcSubmit.load(JdbcSubmit.java:250)
  at com.eviware.soapui.impl.wsdl.panels.teststeps.JdbcSubmit.runQuery(JdbcSubmit.java:196)
  at com.eviware.soapui.impl.wsdl.panels.teststeps.JdbcSubmit.run(JdbcSubmit.java:160)
  at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
  at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
  at java.util.concurrent.FutureTask.run(Unknown Source)
  at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
  at java.lang.Thread.run(Unknown Source)

4 Replies

  • SmartBear_Suppo's avatar
    SmartBear_Suppo
    SmartBear Alumni (Retired)
    Hi!

    hmm.. have you checked the "Stored Procedure" checkbox? If so, please try unchecking it to see if that makes a difference.. let us know!

    regards,

    /Ole
    eviware.com
  • PBell's avatar
    PBell
    Occasional Contributor
    It does make a difference. thanks . but very strange behavior i must say.
    • jovanaSS's avatar
      jovanaSS
      Occasional Visitor

      Hi all,

       

      I had the same issue whit JDBC Request - 2019-05-09 15:25:43 - Error getting response; com.microsoft.sqlserver.jdbc.SQLServerException: Incorrect syntax near '{'.

      Somehow I checked 'Select if this is a stored procedure' and when I unchecked this box my request worked fine.

       

       

      • groovyguy's avatar
        groovyguy
        Champion Level 1

        jovanaSS be aware you're replying to a thread that's 6+ years old. You may want to consider starting a new thread with your specific details. :)