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. SQL Issue during database creation

SQL Issue during database creation

Scheduled Pinned Locked Moved Database
databasehelpquestion
3 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.
  • B Offline
    B Offline
    Bahram Zarrin
    wrote on last edited by
    #1

    Does anyone see a problem with the following? I am getting a a mesage saying "Syntax Error" when I try to run the query to create the table. sql = "CREATE TABLE tblPrograms ([index] Counter," & _ "[lngPlatformFK] TEXT(255) NOT NULL," & _ "[strCompany] TEXT(255)," & _ "[strProgramName] TEXT(255) NOT NULL," & _ "[strVersion] TEXT(255)," & _ "[strInfo] MEMO NOT NULL," & _ "[strURL] MEMO," & _ "[strLetter] TEXT(1) NOT NULL," & _ "[strNew] NUMBER(1)," & _ "[strMU] TEXT(1) NOT NULL," & _ "[strUpdate] TEXT(255)," & _ "[strType] TEXT(10)," & _ "[strKey] MEMO NOT NULL)" bah10z

    L J 2 Replies Last reply
    0
    • B Bahram Zarrin

      Does anyone see a problem with the following? I am getting a a mesage saying "Syntax Error" when I try to run the query to create the table. sql = "CREATE TABLE tblPrograms ([index] Counter," & _ "[lngPlatformFK] TEXT(255) NOT NULL," & _ "[strCompany] TEXT(255)," & _ "[strProgramName] TEXT(255) NOT NULL," & _ "[strVersion] TEXT(255)," & _ "[strInfo] MEMO NOT NULL," & _ "[strURL] MEMO," & _ "[strLetter] TEXT(1) NOT NULL," & _ "[strNew] NUMBER(1)," & _ "[strMU] TEXT(1) NOT NULL," & _ "[strUpdate] TEXT(255)," & _ "[strType] TEXT(10)," & _ "[strKey] MEMO NOT NULL)" bah10z

      L Offline
      L Offline
      Luc Pattyn
      wrote on last edited by
      #2

      I don't see anything wrong, but that may be because I didn't look closely since you didn't use PRE tags which would improve readability. The good thing is you were wise to choose multiple lines, so you can easily remove part of the statement and discover which part is causing the trouble. :)

      Luc Pattyn [Forum Guidelines] [My Articles]


      DISCLAIMER: this message may have been modified by others; it may no longer reflect what I intended, and may contain bad advice; use at your own risk and with extreme care.


      1 Reply Last reply
      0
      • B Bahram Zarrin

        Does anyone see a problem with the following? I am getting a a mesage saying "Syntax Error" when I try to run the query to create the table. sql = "CREATE TABLE tblPrograms ([index] Counter," & _ "[lngPlatformFK] TEXT(255) NOT NULL," & _ "[strCompany] TEXT(255)," & _ "[strProgramName] TEXT(255) NOT NULL," & _ "[strVersion] TEXT(255)," & _ "[strInfo] MEMO NOT NULL," & _ "[strURL] MEMO," & _ "[strLetter] TEXT(1) NOT NULL," & _ "[strNew] NUMBER(1)," & _ "[strMU] TEXT(1) NOT NULL," & _ "[strUpdate] TEXT(255)," & _ "[strType] TEXT(10)," & _ "[strKey] MEMO NOT NULL)" bah10z

        J Offline
        J Offline
        Jerry Hammond
        wrote on last edited by
        #3

        engbahramZarin wrote:

        "[strNew] NUMBER(1)," & _

        Is this really a string datatype, or are you naming it as a string even though you are declaring it a number type just to keep the guys on their toes?

        "My interest is in the future because I'm going to spend the rest of my life there." - Charles F. Kettering

        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