View Single Post

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

Are you sure that none of the columns will allow nulls AND that there are no records that contain nulls? I don't know of there ever
being a bug in ADO related to returning false null values.

I will assume that your table actually includes null value. You have a couple of choices.

1. test for null (If IsNull(rs(0).value) then ...)
2. in your case of string values you can just concatenate an empty string to the field ( strData = rs(0).value & "")

I hope this helps.

--
Al Reid

"It ain't what you don't know that gets you into trouble. It's what you know
for sure that just ain't so." --- Mark Twain

"Carolina" <ccordero@gmx.net> wrote in message news:f464b802.0404220852.a9db2b9@posting.google.co m...
> Hello.
>
> I am using Sybase SQL Advantage to execute a stored procedure which
> returns rows with a nvarchar data type column, and everything works
> fine. It always returns valid data for that column.
>
> But when I execute the same stored procedure from VB6, VB.NET or ASP,
> I get null values for the same nvarchar column, and just for some
> rows, not for all of them.
>
> I am using:
>
> a) ASE 12.0.0.5 running on Solaris 8
>
> b) Sybase System 11 ODBC Driver (SYSYBNT.DLL, version 3.11.00.01)
>
> c) Visual Basic 6.0 SP5 with this connection string:
> "Provider=MSDASQL;Driver=Sybase System 11;SRVR=servername;DB=dbname;
> UID=login;PWD=password;WKID=hostname;APP=appname"
>
> or Visual Basic .NET with this connection string:
> "Driver=Sybase System 11;SRVR=servername;DB=dbname;
> UID=login;PWD=password;WKID=hostname;APP=appname"
> and this reference: Imports Microsoft.Data.Odbc
>
> or ASP 3.0
>
>
> d) ADO 2.5 to 2.8
>
>
> Have anybody outhere faced this problem?
>
> I don't understand what this could be. I think there is some problem
> with ADO, but I'm not sure where is the problem exactly.
>
> I would appreciate any help!
>
> Thank you.



Reply With Quote