3 Replies - 738 Views - Last Post: 10 September 2010 - 03:12 AM Rate Topic: -----

#1 Snehal N  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 13
  • Joined: 26-November 09

SQL Server 2008

Posted 02 September 2010 - 10:21 PM

in SQL server 2008 i cant find datatype "Yes/No" or is there any other datatype which will work same as "Yes/No" ?
Is This A Good Question/Topic? 0
  • +

Replies To: SQL Server 2008

#2 Ionut  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 385
  • View blog
  • Posts: 1,057
  • Joined: 17-July 10

Re: SQL Server 2008

Posted 03 September 2010 - 03:24 AM

"Bit" is what you are looking for. It takes the values 0/1(False/True).
Was This Post Helpful? 0
  • +
  • -

#3 Snehal N  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 13
  • Joined: 26-November 09

Re: SQL Server 2008

Posted 09 September 2010 - 02:27 AM

i have two radio buttons ,one of them will be choose by user..
i want to store value which is choosed by user in database
i have taken bit datatype for the particular column,so i want code to check which is selected ...
thanks in advance
Was This Post Helpful? 0
  • +
  • -

#4 CharlieMay  Icon User is offline

  • This space intentionally left blank
  • member icon

Reputation: 1533
  • View blog
  • Posts: 4,919
  • Joined: 25-September 09

Re: SQL Server 2008

Posted 10 September 2010 - 03:12 AM

Same applies with what ionut stated. Store the value of one of the option buttons as a bit. If true is stored, then option1 is checked, otherwise you would set your code to make option2 checked.

If myBitValueFromMyDatabase = True Then
Option1.Checked = True
else
Option2.Checked = True
End If
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1