•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the MS Access and FileMaker Pro section within the Web Development category of DaniWeb, a massive community of 401,971 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,842 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Views: 4105 | Replies: 1
![]() |
•
•
Join Date: Jun 2007
Posts: 49
Reputation:
Rep Power: 2
Solved Threads: 2
I have a program that creates a SQL statement based upon a treeview list that the user makes. The SQL statement looks like this:
but I continually get a Syntax error - when I check it with a validator it is on the DOUBLE variable. The VB error that i get is System.Data.OleDB.OleDBException: Syntax error in field definition. Which is why I think it is my SQL that is messed up - any help is appreciated. Thanks
CREATE TABLE Test ( Test ID PRIMARY KEY, Check1 CHAR(255), Check2 MEMO, Check3 INTEGER, Check4 DOUBLE, Check5 DATETIME, Check6 BOOLEAN) VALUES (1, 'DefSML', 'DefLRG', 0, 0.0, '3/7/2008 12:00:00 AM', 'True');
but I continually get a Syntax error - when I check it with a validator it is on the DOUBLE variable. The VB error that i get is System.Data.OleDB.OleDBException: Syntax error in field definition. Which is why I think it is my SQL that is messed up - any help is appreciated. Thanks
Last edited by peter_budo : Mar 10th, 2008 at 8:15 pm. Reason: Keep It Organized - please use [code] tags
Mr.Wobbles~
•
•
•
•
I have a program that creates a SQL statement based upon a treeview list that the user makes. The SQL statement looks like this:
CREATE TABLE Test ( Test ID PRIMARY KEY, Check1 CHAR(255), Check2 MEMO, Check3 INTEGER, Check4 DOUBLE, Check5 DATETIME, Check6 BOOLEAN) VALUES (1, 'DefSML', 'DefLRG', 0, 0.0, '3/7/2008 12:00:00 AM', 'True');
but I continually get a Syntax error - when I check it with a validator it is on the DOUBLE variable. The VB error that i get is System.Data.OleDB.OleDBException: Syntax error in field definition. Which is why I think it is my SQL that is messed up - any help is appreciated. Thanks
I dont think you can use the VALUES statement at the same time as CREATE in ACCESS.
- Field Name has space (causes problems later)
- The int specifier is missing for the Primary Key
- Then BOOLEAN specifier not valid - use YESNO
But corrected as...
CREATE TABLE Test (TestID int PRIMARY KEY, Check1 CHAR(255), Check2 MEMO, Check3 INTEGER, Check4 DOUBLE, Check5 DATETIME, Check6 YESNO);
should work, then use an INSERT statement for the first record.
![]() |
•
•
•
•
•
•
•
•
DaniWeb MS Access and FileMaker Pro Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
access ajax asp avoiding null results when adding two columns any of which is null in ms sql server code combo copy a table from one database to another database in another ms sql server using sql server management studio data database decimal seperator thousand seperator when using sql server deleting records from ms sql table where columns have duplicate values developer development dropdownlist gpt guid partition table hacker how to insert big html markup with white spaces(i.e. line breaks) and single and double quotation marks to sql server how to restrict access to a specific file ip javascript delete all rows from table in management studio 2005 microshaft microsoft module ms msdn net news office partition reuse security software sql sql cache dependency with polling-based invalidation survey vista web
- Applying Constraints after creating a table. (MS SQL)
- Create Access Database using SQL queries (MS Access and FileMaker Pro)
- Problem connecting to SQL Server Express (C#)
- access report (Visual Basic 4 / 5 / 6)
- how to create new table in MS Access2003 database using VB6 (Visual Basic 4 / 5 / 6)
- Connecting to a SQL Server Database using VB (VB.NET)
- question about connecting odbc to sql through php script (PHP)
- connecting to access via vb.net-HELP!!! (VB.NET)
Other Threads in the MS Access and FileMaker Pro Forum
- Previous Thread: subform without fields
- Next Thread: 1-D Arrays


Linear Mode