Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. Allow zero length

Allow zero length

Scheduled Pinned Locked Moved Database
tutorial
4 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    Robert1974
    wrote on last edited by
    #1

    How to tell MS Access to allow zero lenght in the strings field using the CREATE TABLE command. Thanks in advance.

    J S 2 Replies Last reply
    0
    • R Robert1974

      How to tell MS Access to allow zero lenght in the strings field using the CREATE TABLE command. Thanks in advance.

      J Offline
      J Offline
      Just Greeky Creek
      wrote on last edited by
      #2

      it is not possible. i think u want to use Char Value type for that field. if there will be a lot of zero length data in field, use varchar type. It doesnt consume your performanse. If u use Char, as if u save zero length data to field, it will reserve a n length place. (n, your charecter count as CHAR(5))

      1 Reply Last reply
      0
      • R Robert1974

        How to tell MS Access to allow zero lenght in the strings field using the CREATE TABLE command. Thanks in advance.

        S Offline
        S Offline
        SimonS
        wrote on last edited by
        #3

        As far as I know MS Access doesn't have any DML DDL statements like CREATE TABLE. The closest you'll get it reading the Msys... hidden tables. If you go into the design view of the table, you will see the various options per field. I think Access allows zero length by default. Remember that zero length and null are different. Cheers, Simon sig ::
        "Don't try to be like Jackie. There is only one Jackie.... Study computers instead.", Jackie Chan on career choices.
        article :: animation mechanics in SVG blog:: brokenkeyboards
        "Most of us are programmers, but a few use VB", Christian Graus

        R 1 Reply Last reply
        0
        • S SimonS

          As far as I know MS Access doesn't have any DML DDL statements like CREATE TABLE. The closest you'll get it reading the Msys... hidden tables. If you go into the design view of the table, you will see the various options per field. I think Access allows zero length by default. Remember that zero length and null are different. Cheers, Simon sig ::
          "Don't try to be like Jackie. There is only one Jackie.... Study computers instead.", Jackie Chan on career choices.
          article :: animation mechanics in SVG blog:: brokenkeyboards
          "Most of us are programmers, but a few use VB", Christian Graus

          R Offline
          R Offline
          Robert1974
          wrote on last edited by
          #4

          Thanks, but I do create my tables with CREATE TABLE (OleDbCommmand.ExecuteNonQuery) and the problem is that I afterwards have to go into access and alter the settings from there. Allowing null I have no problems with. /Robert

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups