Skip to Content.
Sympa Menu

freetds - Stored Procedure contains incomplete results if called by freeTDS JDBC..

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Blackened" <blackened AT manx.net>
  • To: freetds AT franklin.oit.unc.edu
  • Subject: Stored Procedure contains incomplete results if called by freeTDS JDBC..
  • Date: Mon, 10 Sep 2001 08:34:37 -0400


We have a storaged procedure in SQL server 2k, that is intended to make it
a lot easier for our front end (JSP) to put results on the screen

i connect to the database using FreeTDS jdbc driver then run this query:
exec database.dbo.storedProcedure 'paramString1', paramInt, 'paramString2'

i get these results from my test app:
[735][blah1][May 21 2001][Jun 22 2001][4936.0][3600
[738][blah2][May 21 2001][Jul 16 2001][4886.0][2800
[8965][blah3][May 31 2001][Jul 13 2001][5296.0][350
[20316][blah4][May 27 2001][Jul 31 2001][4074.8401]
[5438][blah5][May 9 2001][Jun 25 2001][2800.0][170
5 results

==
I then connect to SQL server using the JDBC-ODBC bridge, run the SAME
query and get:
[735][blah1][May 21 2001][Jun 22 2001][4936.0][3600.0][
[738][blah2][May 21 2001][Jul 16 2001][4886.0][2800.0]
[8965][blah3][May 31 2001][Jul 13 2001][5296.0][350
[20316][blah4][May 27 2001][Jul 31 2001][4074.8401][
[5438][blah5][May 9 2001][Jun 25 2001][2800.0][1700.0]
[720][blah6][May 5 2001][null][5214.0][null][null][N]_
[731][blah7][May 14 2001][null][5224.0][null][null][N]
[733][blah8][May 18 2001][null][5214.0][null][null][N]_
8 results

==

The second result set is the one we want.. note the difference is when
FreeTDS calls the stored procedure, the rows with null values are not
returned. What does FreeTDS do, or not do, to SQL server, that makes it
turn off any-column-null-then-drop-the-row results?

cheers



  • Stored Procedure contains incomplete results if called by freeTDS JDBC.., Blackened, 09/10/2001

Archive powered by MHonArc 2.6.24.

Top of Page