🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: ADO Command Component/SQL Syntax Question

#4778
From: jqpdev
Date: Fri, 19 Oct 2001 20:25
69 lines
3064 bytes
Thanks for your time and replay Lee.
I tried what you suggested, but it didn't work.
I got an EoleException message that said the "number of query values and
destination fields are not the same".

"Lee Gan" <leegan@hotmail.com> wrote in message news:3bcb51f8$1_2@dnews...
> 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: <3bd08b78$1_1@dnews>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!dnews
References: <3bc85e2c$1_2@dnews> <3bcb51f8$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-19 13:32:03 PST
From: "jqpdev" <jqpdev@whowhatwhere.com>
Newsgroups: borland.public.cppbuilder.database.ado
References: <3bc85e2c$1_2@dnews> <3bcb51f8$1_2@dnews>
Subject: Re: ADO Command Component/SQL Syntax Question
Date: Fri, 19 Oct 2001 16:25:27 -0400
Lines: 71
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4807.1700
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700
NNTP-Posting-Host: 24.185.61.176
Message-ID: <3bd08b78$1_1@dnews>
X-Trace: dnews 1003522936 24.185.61.176 (19 Oct 2001 13:22:16 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!dnews