Article View: borland.public.cppbuilder.database.ado
Article #4762Re: ADO Command Component/SQL Syntax Question
From: Lee Gan
Date: Mon, 15 Oct 2001 21:15
Date: Mon, 15 Oct 2001 21:15
57 lines
2819 bytes
2819 bytes
Why don't you try INSERT INTO tbl_Semesters VALUES (:SemesterCategory, :Year, :Active); It should work. It works on mine anyway. Good luck. Lee Gan <jqpdev> wrote in message news:3bc85e2c$1_2@dnews... > 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:
<3bcb51f8$1_2@dnews>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!nntp.abs.net!news.maxwell.syr.edu!news-out.nuthinbutnews.com!propagator2-austin!propagator!feed2.newsfeeds.com!newsfeeds.com!news-in-austin.nuthinbutnews.com!intgwlon.nntp.telstra.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnewsReferences:
<3bc85e2c$1_2@dnews>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10698b,a71d499ca9f0e9ae X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2001-10-15 14:27:30 PST From: "Lee Gan" <leegan@hotmail.com> Newsgroups: borland.public.cppbuilder.database.ado References: <3bc85e2c$1_2@dnews> Subject: Re: ADO Command Component/SQL Syntax Question Date: Mon, 15 Oct 2001 15:15:36 -0600 Lines: 59 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2919.6600 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 NNTP-Posting-Host: 207.34.102.197 Message-ID: <3bcb51f8$1_2@dnews> X-Trace: dnews 1003180536 207.34.102.197 (15 Oct 2001 14:15:36 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!nntp.abs.net!news.maxwell.syr.edu!news-out.nuthinbutnews.com!propagator2-austin!propagator!feed2.newsfeeds.com!newsfeeds.com!news-in-austin.nuthinbutnews.com!intgwlon.nntp.telstra.net!newsfeeds.ihug.co.nz!ihug.co.nz!dnews