SQLExpress - Xb2.NET     ot4xb  
   Announcement      Free XUG Meeting Toronto/Canada (May 25, 2008)       [ More Info ... ]
sqlexpress
What BIT values to use in oStmt?
Thread Starter: Mahanimann Started: 12/25/2006 1:21 PM UTC
Replies: 1
What BIT values to use in oStmt?
Guru's,

I use the SQL BIT type for logical fields.  This works fine with :FieldGet()/:FieldPut(), but what SqlExpress compatible values do I use in SQL statements?

Example: "UPDATE Customers SET lActive=1" does update the table, but when retrieving with oCustCurs:FieldGet("lActive") I allways get .F. (I've tried with several different parameters, including SET lActive = b'1')

Thanks for any enlightenment!

Best regards,
Mahanimann
Re: What BIT values to use in oStmt?
"Mahanimann" <paaldalen@gmail.com> wrote in
news:3h5wa5zm2k3hwnv.251220061419@ANDREA:  

I use the SQL BIT type for logical fields.  This works fine with :FieldGet()/:FieldPut(), but what SqlExpress compatible values do I use
in SQL statements?
Example: "UPDATE Customers SET lActive=1" does update the table, but
when retrieving with oCustCurs:FieldGet("lActive") I allways get .F.
(I've tried with several different parameters, including SET lActive =
b'1')  

what does the DBMS return for this column when you execute a SELECT using the DBMS's query tools?

Don't know if this will work, but try setting the BIT column to "T"/"F", eg: UPDATE Customers SET lActive='T'

Best regards,
Boris Borzic
-- news://news.Xb2.NET
http://www.Xb2.NET
http://www.SQLExpress.net
industrial strength Xbase++ development tools