× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hi All,

We have been using JDBCR4 to run SQL statements and Stored Procedures on a
MS SQL server for a long time.

Client has moved to a new cloud based server and a few stored procedures
are not returning anything. This is a later version of MS SQL Server

In debug I can see the result of

isResultSet = JDBC_execCall( prepStmt )

Is 0

So I added a call to get the update count as

if isresultSet = *OFF;
rc = JDBC_getUpdateCount( prepstmt );
endif;

This returns a value of 16817. This does match the number of records
written to the temporary tables before the SP runs the query that should
return the result set.

So the JDBC call is interpreting the result as an update count and not a
result set.

I tried adding IsResultSet = JDBC_getMoreResults( prepstmt ); checking
the possibility of more than one result set being returned but again 0 is
returned.

What I am not understanding is how to code the stored procedure that used
temp tables to return the result set.

The SP has worked previously but that was on an older version of MS SQL
server and when the server was locally in house and not in the cloud.

If I run the query manually within MS SQL Management Studio it returns the
correct list.

We have the following JDBC jar files installed

sqljdbc.jar
sqljdbc4.jar

Not sure how to tell the actual version ?

Any suggestions gratefully appreciated.

Thanks

Don



--
This email has been scanned for computer viruses. Although MSD has taken reasonable precautions to ensure no viruses are present in this email, MSD cannot accept responsibility for any loss or damage arising from the use of this email or attachments..

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.