Bit Data type

When I use the bit data type (SQL 2008 SNC) the "true" value shows up
as -1 even though the SQL server mgt Studio shows it as 1.  And when I
query in PB for 1 nothing is returned.  This makes me nervous.  I
don't want to build dws where clauses with bit column = -1 and then
have it change somehow down the road.  Anybody know why PB is behaving
this way?

Thanks & happy holidays,
SPD
0
SPD0060
12/26/2009 8:18:24 PM
sybase.powerbuilder.database 9855 articles. 2 followers. Follow

3 Replies
771 Views

Similar Articles

[PageSpeed] 24

On Dec 26, 2:18=A0pm, SPD0060 <sda...@archi-tech-ture.com> wrote:
> When I use the bit data type (SQL 2008 SNC) the "true" value shows up
> as -1 even though the SQL server mgt Studio shows it as 1. =A0And when I
> query in PB for 1 nothing is returned. =A0This makes me nervous. =A0I
> don't want to build dws where clauses with bit column =3D -1 and then
> have it change somehow down the road. =A0Anybody know why PB is behaving
> this way?
>
> Thanks & happy holidays,
> SPD

I did a Google search and did not find the post a few below this one
sorry.  After digging I found the original discussion :
http://groups.google.com/group/sybase.public.powerbuilder.database/browse_t=
hread/thread/7234448a52d4dd81/40b3b91b25e005d9?lnk=3Dgst&q=3Dbit+data#40b3b=
91b25e005d9

Since I'm writing a new app, instead of changing the staicbind, I'll
use the suggestion to use the c++ paradigm -  anything other than 0 is
true.  Anyone disagree?  Sounds like thet should work even they fix
this in the future.

Thanks,
Shawn
0
SPD0060
12/26/2009 8:30:17 PM
On Dec 26, 2:30=A0pm, SPD0060 <sda...@archi-tech-ture.com> wrote:
> On Dec 26, 2:18=A0pm, SPD0060 <sda...@archi-tech-ture.com> wrote:
>
> > When I use the bit data type (SQL 2008 SNC) the "true" value shows up
> > as -1 even though the SQL server mgt Studio shows it as 1. =A0And when =
I
> > query in PB for 1 nothing is returned. =A0This makes me nervous. =A0I
> > don't want to build dws where clauses with bit column =3D -1 and then
> > have it change somehow down the road. =A0Anybody know why PB is behavin=
g
> > this way?
>
> > Thanks & happy holidays,
> > SPD
>
> I did a Google search and did not find the post a few below this one
> sorry. =A0After digging I found the original discussion :http://groups.go=
ogle.com/group/sybase.public.powerbuilder.database/br...
>
> Since I'm writing a new app, instead of changing the staicbind, I'll
> use the suggestion to use the c++ paradigm - =A0anything other than 0 is
> true. =A0Anyone disagree? =A0Sounds like thet should work even they fix
> this in the future.
>
> Thanks,
> Shawn

Ok, after testing that theory I can't get a dw to retrieve based on a
bit value no matter what I put in =3D 1 or <> 0 or =3D -1, nothing works.
Suggestions would be eagerly accepted.

Thanks,
Shawn
0
SPD0060
12/26/2009 8:40:54 PM
On Dec 26, 2:40=A0pm, SPD0060 <sda...@archi-tech-ture.com> wrote:
> On Dec 26, 2:30=A0pm, SPD0060 <sda...@archi-tech-ture.com> wrote:
>
>
>
>
>
> > On Dec 26, 2:18=A0pm, SPD0060 <sda...@archi-tech-ture.com> wrote:
>
> > > When I use the bit data type (SQL 2008 SNC) the "true" value shows up
> > > as -1 even though the SQL server mgt Studio shows it as 1. =A0And whe=
n I
> > > query in PB for 1 nothing is returned. =A0This makes me nervous. =A0I
> > > don't want to build dws where clauses with bit column =3D -1 and then
> > > have it change somehow down the road. =A0Anybody know why PB is behav=
ing
> > > this way?
>
> > > Thanks & happy holidays,
> > > SPD
>
> > I did a Google search and did not find the post a few below this one
> > sorry. =A0After digging I found the original discussion :http://groups.=
google.com/group/sybase.public.powerbuilder.database/br...
>
> > Since I'm writing a new app, instead of changing the staicbind, I'll
> > use the suggestion to use the c++ paradigm - =A0anything other than 0 i=
s
> > true. =A0Anyone disagree? =A0Sounds like thet should work even they fix
> > this in the future.
>
> > Thanks,
> > Shawn
>
> Ok, after testing that theory I can't get a dw to retrieve based on a
> bit value no matter what I put in =3D 1 or <> 0 or =3D -1, nothing works.
> Suggestions would be eagerly accepted.
>
> Thanks,
> Shawn- Hide quoted text -
>
> - Show quoted text -

I'm an idiot. :-)  I was certain what I was retrieving had data in it
but it didn't of course.  <>0 works fine.

sorry,
spd
0
SPD0060
12/26/2009 8:45:42 PM
Reply:

Similar Artilces:

Bit Data type column from Database to ASP Data grid getting error Cast from type 'DbDataRecord' to type 'Boolean' is not valid.
I have bit Datatype column in my table and I am putting this table into ASP datagrid  I have created a check box in thiscolumn in datagrid using itemtemplate.  so this bit column should have a check box next to it in datagrid but I am getting this when running the app  Cast from type 'DbDataRecord' to type 'Boolean' is not valid. any one know any thing about this issue Hi, khana04: I am not sure about what you are going to do about convert DbDataRecord to Boolean. Would u please show us some code about  it. However, the following code works fine for me to retrive t...

How import mixed data type of Data into SQL Database
 Hi all,    I create Excel sheet name Personal and it contain two columns  which are Name and ID.Now I need to import data from Excel sheet in to SQL Database and I done it.but Problem is if each one Column contain many types of data.in  some data is indicate Nulls after imported data.as follows.Before Import data in Excel Sheet                                    Name ID Harsha...

How to convert varchar data type into datetime data type without data lose
Hi all, i have stored date as varchar(30) data type and Date format is dd/MM/yyyy now i have to convert it into datatime data type can u help me in query ?  i have 330 records and each recod contain the Date in format of dd/MM/YYYY but due to varchar data type i can not perform calculation on Date so i have to convert into datetime without data lose. please help me in this regard. Best RegardsRameezWaheed  life is name of learning!Mark as an answer if it helps You can check these posts http://forums.microsoft.com/TechNet/ShowPost.aspx?PostID=2039108&SiteID=17   ...

Powerbuilder data types
Is there a comprehensive list of the data types that PB can support within Powerscript. I checked the Help, but the list seems too short. TIA. Fred. Fred -- Pull up the object browser. I didn't do an exhaustive review, but it looks like you can declare variables of any type that's listed under the following tabs: window menu user object system enumerated structure data type HTH Ron Gallagher, CPDP Atlanta, GA rongallagher@mindspring.com fdefranco wrote in message ... >Is there a comprehensive list of the data types that PB can support within &...

Call data from database and change data in database.
How can I call the value of a field from a database and then use an "if" to do different things when the user clicks on a button? Also, how can I then change that value of the field when I want to? Thanks, Sam  Could you please explain the question in detail.......     From the question, we can get the value by   OdbcConnection con = new OdbcConnection(); con.ConnectionString = ConfigurationManager.ConnectionStrings["ConnectionStringName"].ConnectionString; con.Open(); OdbcCommand cmd = new OdbcCommand("SELECT ID FROM tabl...

BIT data type..
Does UltraLite support BIT data type? Dejan Marjanovic SWING GmbH As far as I know, Yes. Why? Are you having problems using it? -- David Fishburn NEW - Certified ASA Developer Version 8 Sybase - iAnywhere Solutions Professional Services Please only post to the newsgroup EBFs and Maintenance Releases http://downloads.sybase.com/swx/sdmain.stm Developer Community / Whitepapers http://www.ianywhere.com/developer CaseXpress - to report bugs http://casexpress.sybase.com "Dejan Marjanovic" <Dejan.Marjanovic@swing-gmbh.de> wrote in message news:4XWLKLAV...

Bit data type
I have in my Sql Server database a field set to data type = Bit When I read the value, which is set to 1 in the database, it comes back -1. I changed the datatype in the database to int and it read it as 1. Why is that? Zath Can you show us the code where you are reading the value? Terri Terri MortonEngagement Manager, NeudesicHow to ask a question Dim DSopt As New DataSet Dim iOpt As Int16 'Also tried integer here with same results sql = "Select * from " _ & "tblAnyTable Where "...

database data type
hello evry1... i hav an id field along wit persons name.id should start wit 1 and continue...can ne1 tel me wat dat type to use in sql database so that i can automatically increment the id value after each entry is made??? its really urgent... use an Integer column with its Identity property enabledMike Banavige~~~~~~~~~~~~Need a site code sample in a different language? Try converting it with: http://converter.telerik.com/ mbanavige:use an Integer column with its Identity property enabled Adding to this, you'll need to supply the identity "seed" ( the value ...

The conversion of a char data type to a datetime data type!!
hello all .. I have a form that includes two textboxes (Date and Version) .. When I try to insert the record I get the following error message .. seems that something wrong with my coversion (Data type)"The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value.The statement has been terminated."   in my SQL database I have the date feild as datetime and the version as nvarchar(max) this is the code in the vb page .. Can you please tell me how to solve this problem?Imports System.Data.SqlClient Imports system.web.configuration ...

Why does it not let me type data in my database fields and gives me error "No row was updated, the data in row 1 was not committed?
Hi, I'm typing example records in my database fields for username, last name, firstname, city, state, etc directly into the database field but when I try to save it it says:  No row was updated. The data in row 1 was not committed.Error Source: .NetSqlClient Data Provider.Error Message: String or binary data would be truncated.The statement has been terminated.Correct the errors and retry or press ESC to cancel the change(s) Basically I'm just typing data into the fields but it won't allow me to save them.    The data types are all saved as...

How to Encrypt the Password and store it in the data base and how to decrypt the encrypted data which is taken from database and check with the typed password in the text box ?
hai to all Using Cryptography in ASP.Net Credentials   how to encrypt the password  and saved the encryprted value in the data base ?  and retrieve the encrypted password from database and decrypt it . OR if any methods is there to do the encryprt and decrypt operations in the Sql server itself ?     To begin with, you should avoid writing such code if at all possible. ASP.NET 2.0 comes with a full membership system that provides UI elements, core code features and pre-defined database schema: you can use as much or as little of that as you want, b...

data type DATA
just want to ask why i still encounter "Type Expected" error in the DATA data type. though i already imports the System.Data.SqlClient...

System.Data.SqlClient.SqlException: The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value.
After testing out the application i write on the local pc. I deploy it to the webserver to test it out. I get this error. System.Data.SqlClient.SqlException: The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value. Notes: all pages that have this error either has a repeater or datagrid which load data when page loading. At first I thought the problem is with the date, but then I can see that some other pages that has datagrid ( that has a date field) work just fine. anyone having this problem before?? hopefully you guys can help...

System.Data.SqlClient.SqlException: The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value
After clicking my update button I'm receiving this error:    The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value. The statement has been terminated. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.SqlClient.SqlException: The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value. The statement has been...

Web resources about - Bit Data type - sybase.powerbuilder.database

Data - Wikipedia, the free encyclopedia
For data in computer science, see Data (computing) . For other uses, see Data (disambiguation) . is a set of values of qualitative or quantitative ...

Data stickies, a graphene alternative to flash drives
Data stickies is a design concept, but not necessarily a pipe dream. There’s some real science here. dataSTICKIES are conceptualized to be made ...

China seeks better governance with big data
China seeks better governance with big data

Turner's Data Dreams Extend Beyond Its Own Walls
Turner Broadcasting has loftier goals for its data products outside of helping its own clients make more efficient and targeted TV ad buys. Internally, ...

How to keep your mobile data safe
Every month we see another story hit the headlines of how a household name has lost customer data. These type of incidents can cost millions ...

Here’s how much your stolen data is worth on the Dark Web
... drugs, counterfeit passports, and even advanced weaponry, it's also proven to be a popular destination for users to traffic in stolen data. ...

6 ways to strengthen your company's data culture
There's a data revolution happening, and younger businesses, like Netflix, Uber, and Airbnb, are at the forefront. These companies are reaping ...

NSA ends bulk phone data collection
MSNBC NSA ends bulk phone data collection CNN (CNN) The U.S. intelligence community on Sunday will cease its bulk collection of telephone ...

Massive VTech hack exposes data of nearly 5 million parents and over 200,000 kids
... The company has “ temporarily suspended ” its Learning Lodge store, which offers apps, music, e-books, and games for children, after its database ...

Hack Of Toy Maker VTech Exposes Data For Millions Of Parents, Kids
Let’s kick off the holiday shopping season with news of a data breach that may involve some toys you’ll be wrapping in the coming weeks. Popular ...

Resources last updated: 11/30/2015 5:03:28 PM