Bill, I am not sure I follow that since the bit data type is just a single 
logical bit value.  Bit values appear to be handled very similarly to Tiny Int 
values, so I will test that to see if they work correctly or not.  

Our database does not seem to use the Text data type mentioned by the other 
response but we use Bit types all over the place.  I know we could do a 
work-around by converting to integer, but I don't think the users of the tool I 
am writing would be very thrilled to have to do that.  I am writing a tool very 
similar to the commercial XLReportGen that takes SQL scripts and dumps reports 
to Excel spreadsheets.

-Ed

Date: Wed, 16 Jun 2010 11:43:43 +0800
From: bill lam <[email protected]>
Subject: Re: [Jprogramming] SQL Server Bit datatype not working with
        ODBC
To: [email protected]
Message-ID: <[email protected]>
Content-Type: text/plain; charset=utf-8

I've never used bit data type and can only guess. Would it be possible
that bit 0 was converted to {.a. and stripped off as termination byte
for c strings?  Did it work if bits returned are all 1's?

???, 15 ??? 2010, Cox, Ed ?????(?):
> I?m finding that bit data types are not being returned correctly via ODBC 
> from SQL Server.  I?ve tried two different drivers (Driver={SQL Server} and 
> Driver={SQL Native Client}).  If I run a query that should return 20 rows of 
> just a single bit field and unbox it the shape is 1 20 0, which looks like 
> the 1 character data is somehow getting lost.
>
> I?ve tried to understand odbc.ijs but have only gotten so far.  I?m better at 
> writing my own code than understanding someone else?s.  I?ve looked in the 
> forum but did not see anything similar to this issue being discussed.
>
> Has anyone else run into this?  I am using J602 on Windows XP.
>
> Ed Cox
> Principal Data Analyst
> [email protected]

_________________________________________________

This message is for the designated recipient only and may contain privileged, 
proprietary
or otherwise private information. If you have received it in error, please 
notify the sender
immediately and delete the original. Any other use of the email by you is 
prohibited.

Dansk - Deutsch - Espanol - Francais - Italiano - Japanese - Nederlands - Norsk 
- Portuguese
Svenska: www.cardinalhealth.com/legal/email

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to