How do I create a YES/NO column in my table?

Ask a Question related to ASP Database, Design and Development.

  1. #1

    Default How do I create a YES/NO column in my table?

    I use this code to create a table dynamically...

    strSQL = "CREATE TABLE (FirstName TEXT(30), LastName TEXT(20));"
    conn.execute(strSQL)


    This will create two text columns. How can I create some YES/NO columns
    instead of TEXT columns?


    michaaal Guest

  2. Similar Questions and Discussions

    1. different column boarders within a table
      It is easy to change the thicknesses of all columns and rows in a table but how to change the thickness of some of the columns and only the vertical...
    2. Getting the column from a table cell
      Hello everyone, Is it possible (and if so, how) to obtain a reference to the column given a table cell for a datagrid? Zahid
    3. add column to table with sql
      Does anyone know the SQL syntax to add a column to an existing Access table?
    4. How can I create a YES/NO column?
      I use this code to dynamically create a column in a table... strSQL = "CREATE TABLE (FirstName TEXT(30), LastName TEXT(20));"...
    5. How to create a table with dynamic table name
      <html><div style='background-color:'><DIV> <DIV class=Section1> <P class=MsoNormal style="mso-layout-grid-align: none"><FONT face="Times New Roman"...
  3. #2

    Default Re: How do I create a YES/NO column in my table?

    What database?

    Ray at home

    "michaaal" <res0gyio@verizon.net> wrote in message
    news:Or$lXZkYEHA.1356@TK2MSFTNGP09.phx.gbl...
    > I use this code to create a table dynamically...
    >
    > strSQL = "CREATE TABLE (FirstName TEXT(30), LastName TEXT(20));"
    > conn.execute(strSQL)
    >
    >
    > This will create two text columns. How can I create some YES/NO columns
    > instead of TEXT columns?
    >
    >

    Ray at Guest

  4. #3

    Default Re: How do I create a YES/NO column in my table?

    Depends on the database. Does the database you're using have documentation
    on the CREATE TABLE command?

    --
    [url]http://www.aspfaq.com/[/url]
    (Reverse address to reply.)





    "michaaal" <res0gyio@verizon.net> wrote in message
    news:Or$lXZkYEHA.1356@TK2MSFTNGP09.phx.gbl...
    >I use this code to create a table dynamically...
    >
    > strSQL = "CREATE TABLE (FirstName TEXT(30), LastName TEXT(20));"
    > conn.execute(strSQL)
    >
    >
    > This will create two text columns. How can I create some YES/NO columns
    > instead of TEXT columns?
    >
    >

    Aaron [SQL Server MVP] Guest

  5. #4

    Default Re: How do I create a YES/NO column in my table?

    > What database?

    Sorry....it is an MSAccess database


    michaaal Guest

  6. #5

    Default Re: How do I create a YES/NO column in my table?

    strSQL = "CREATE TABLE TableName (Firstname TEXT(30), Lastname TEXT(20),
    SomeYesNo BIT)"

    Ray at home

    > I use this code to create a table dynamically...
    > strSQL = "CREATE TABLE (FirstName TEXT(30), LastName TEXT(20));"
    > conn.execute(strSQL)
    "michaaal" <res0gyio@verizon.net> wrote in message
    news:OfwTNBlYEHA.712@TK2MSFTNGP11.phx.gbl...
    > > What database?
    >
    > Sorry....it is an MSAccess database
    >
    >

    Ray at Guest

  7. #6

    Default Re: How do I create a YES/NO column in my table?

    Thanks Ray, it worked great.





    "Ray at <%=sLocation%> [MVP]" <myfirstname at lane34 dot com> wrote in
    message news:ekLgjJlYEHA.1224@TK2MSFTNGP09.phx.gbl...
    > strSQL = "CREATE TABLE TableName (Firstname TEXT(30), Lastname TEXT(20),
    > SomeYesNo BIT)"
    >
    > Ray at home
    >
    >
    > > I use this code to create a table dynamically...
    >
    > > strSQL = "CREATE TABLE (FirstName TEXT(30), LastName TEXT(20));"
    > > conn.execute(strSQL)
    >
    > "michaaal" <res0gyio@verizon.net> wrote in message
    > news:OfwTNBlYEHA.712@TK2MSFTNGP11.phx.gbl...
    > > > What database?
    > >
    > > Sorry....it is an MSAccess database
    > >
    > >
    >
    >

    michaaal Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139