473,322 Members | 1,566 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

C# and/or SQL gurus needed ! sql bit field & c#

Hi there,

I am trying to get the value of an SQL bit field, to link it to an groupbox
with 2 radiobuttons.

but for some reason..the value of the bit field is NEVER 1/true

code:

if sqlfield=true
radioYES.checked=true
else
radioNO.checked=true

I've tried this if (data.tabel[0]["FIELD"].ToString() == "-1")
and this if (data.tabel[0]["FIELD == true)
and this if (data.tabel[0]["FIELD"].ToString() == "1")
radioButton_nameYES.Checked=true;
else
radioButton_nameNO.Checked=true;

but nothing seems to help

please..give me some advice
Nov 15 '05 #1
1 5204
fixed

if ((bool)data.tabel[0]["FIELD"])

"VegaGucci" <no@spam.com> wrote in message
news:O$**************@tk2msftngp13.phx.gbl...
Hi there,

I am trying to get the value of an SQL bit field, to link it to an groupbox with 2 radiobuttons.

but for some reason..the value of the bit field is NEVER 1/true

code:

if sqlfield=true
radioYES.checked=true
else
radioNO.checked=true

I've tried this if (data.tabel[0]["FIELD"].ToString() == "-1")
and this if (data.tabel[0]["FIELD == true)
and this if (data.tabel[0]["FIELD"].ToString() == "1")
radioButton_nameYES.Checked=true;
else
radioButton_nameNO.Checked=true;

but nothing seems to help

please..give me some advice

Nov 15 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

46
by: Kingdom | last post by:
In my data base I have a list of componet types e.g. type A - I have 8 off - type B I have 12 off etc. I'm using Set objRS = objDC.Execute("Select DISTINCT Component_Type FROM Parts_Table") ...
14
by: Saturnin Kepa | last post by:
The Scenario: We have some data that can be in three states. One is a saved state, a temporary state, and a complete state. The complete state is the bulk of the data. This data will be...
18
by: B Love | last post by:
I just need a small mod to my code (I think) to get the result I want. Earlier this week I had received help from FredG on concatenating a field in a form. I went on to create a field in the form...
2
by: J Sahoo | last post by:
Hi, I have a browse page where I am showing few fields from my SQL Server table. One of the field is Image type, all the fields are bound to a single table. I want to show the image from the...
17
by: Aaron | last post by:
I've got a doozie of a problem! I and others have been trying to figure this out for too long and I've come to the conclusion that I should probably look for some support.. Ok, I have a COM...
24
by: cameltoer | last post by:
Need a good tutorial on Classes, OOP, Template systems, etc, because absolutely nothing, and I mean nothing looks familiar to my procedural based programming that has served me for years. Should I...
1
by: Sideswipe | last post by:
I am trying to concatenate selected values from numerous radio button sets into 1 series and assign it to a single hidden field. I have never done javascript before and I continue to run into...
0
by: Silly Milly | last post by:
Calling ALL SSIS GURUS I am trying to import identical MDBs (Access Database) columns into SQL Server 2005 using foreach loop in SSIS. The data and file name of the MDBs are not the same; however...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.