🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.database.ado
Article #4752

ADO Command Component/SQL Syntax Question

#4752
From: jqpdev
Date: Sat, 13 Oct 2001 15:33
41 lines
2281 bytes
Hello All,

I'm trying to do and SQL Insert with an ADO Command Component.  I checked
several times
and the SQL statement looks legit.  I get an error message that says there is a
syntax error with the insert into statement.
Here is the SQL statement:
---------------------------------------
INSERT INTO tbl_Semesters(SemesterCategory, Year, Active)
VALUES(:SemesterCategory, :Year, :Active  );
---------------------------------------

I'm currently using Access2000.  In my DB I have a table called "tbl_Semesters",
with the following fields:
Semester_ID = AutoInc
SemesterCategory = LongInt (Foriegn Key Ref)
Year = LongInt
Active = Boolean (Access2000 say Yes/No Field Type)

All values placed in the parameters are valid... I double checked.
I have another command component with a SQL statement similar to the one above,
but for another table. The only difference is the field names/parameter
names/param data types are different.

Am I missing something with the SQL syntax, the ADO Command Component, or proper
use of the ADO Command Component?

Just in case you wanted to know I'm using
- BCB v5 Enterprise with Update Pack1
- MDAC v2.5
- Access2000
- Win2K Server
- P3-500
- 512Meg of RAM
- 6 Gig partition with 3.13gig free
- 1.5gig swap file
- Hard drive scanned for errors and there were none
- Hard drive was defraged
- Only the bare essentials for development and use have been installed on the
partition.
- NO 3rd party controls/experts/IDE adds.
Technical Details
Message-ID: <3bc85e2c$1_2@dnews>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!hub.org!hub.org!PeerFeed.KWeb.on.ca!dnews

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10698b,a71d499ca9f0e9ae,start
X-Google-Attributes: gid10698b,public
X-Google-ArrivalTime: 2001-10-13 08:31:08 PST
From: <jqpdev>
Newsgroups: borland.public.cppbuilder.database.ado
Subject: ADO Command Component/SQL Syntax Question
Date: Sat, 13 Oct 2001 11:33:53 -0400
Lines: 43
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4522.1200
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4522.1200
NNTP-Posting-Host: 24.185.61.176
Message-ID: <3bc85e2c$1_2@dnews>
X-Trace: dnews 1002987052 24.185.61.176 (13 Oct 2001 08:30:52 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!hub.org!hub.org!PeerFeed.KWeb.on.ca!dnews