Forum Discussion

VGaur's avatar
VGaur
Contributor
7 years ago

Unable to use sql functions JDBC steps

Hey,

 

I am trying to write a JDBC query to insert/update a location field in a table but seems like Ready!API is not able to  insert/update record.The connection settings to the database are good but query doesn't seems to work. Here is a sample/random query that I ma trying to run. Got it from here . I don't believe that is the sql version problem at our end because sql management tool is able to run it. Any clues?

 

Query - 

DECLARE @g geography
SET @g = geography::STGeomFromText('POINT(' + CAST([Longitude] AS VARCHAR(20)) + ' ' + CAST([Latitude] AS VARCHAR(20)) + ')', 4326)
SELECT @g.ToString() 

 

Error - Error getting response for [JDBC Request]; com.microsoft.sqlserver.jdbc.SQLServerException: The value is not set for the parameter number 1.

 

Thanks

2 Replies

  • Nastya_Khovrina's avatar
    Nastya_Khovrina
    SmartBear Alumni (Retired)

    Hi Varun,

     

    Thank you for your post. As we have found out in the corresponding support case not all SQL functions don't work. For example, the DATEADD function works fine.

    Let's continue working in the support case regarding the issue.  

    • Nastya_Khovrina's avatar
      Nastya_Khovrina
      SmartBear Alumni (Retired)

      Varun,

       

      Currently, it's not possible to use queries with geometry::STGeomFromText or geography::STGeomFromText in Ready! API. We have registered a feature request in our DB to implement this functionality.