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