View Single Post

   
  #3 (permalink)  
Old 04-08-2008, 03:26 PM
Carolina
 
Posts: n/a
Default Re: ADO reads null values from Sybase stored procedure result

Dear Al, thank you for your help!

Here are some more details:

The stored procedure expects two parameters: an employee ID and a
date, which are the primary key for my first table, and part of the
primary key for a related table, thus the procedure returns rows from
the second table for the specified employee and date.

For a particular set of parameters, the procedure returns four rows:
for the first row the nvarchar column that I need to read has a null
value, which is correct based on a set of conditions for this row.
For the next three rows, the same column have valid string values.
Well... this is the result that I get when I execute the procedure
using Sybase SQL Advantage and other tool provided by my Sybase
vendor.

But, when I execute this stored procedure for the same employee + date
using VB6, VB.NET or ASP, I get null values for the same nvarchar
column for the third and fourth rows, and only the second row has the
valid string value.

I've used the VB.NET IsDBNull() and VB6 IsNull() functions, as you
suggested. That's how I know that my app reads null values for some
records, but SQL Advantage has no problem reading the correct values
in the same column for those same records.
Reply With Quote