Article View: borland.public.cppbuilder.database.ado
Article #3562Query problem
From: Uros Obradovic
Date: Fri, 02 Aug 2002 02:17
Date: Fri, 02 Aug 2002 02:17
20 lines
1428 bytes
1428 bytes
Hi guys,
whats wrong in this syntax ?
AnsiString Str = ComboBox1->Items->Strings[index];
Query->Close();
Query->SQL->Clear();
Query->SQL->Add("SELECT Division");
Query->SQL->Add("FROM company, companydivisions");
Query->SQL->Add("WHERE company.Name = :Str"); <--- I'm getting an error
in here
Query->SQL->Add("AND company.DivisionID = companydivisions.DivisionID");
Query->Open();
I'm getting an error because of Str value ? The value that I'm getting for
Str is correct, but something is wrong w/ SQL statement.
Can you help me please
Thanks
Uros
Technical Details
Message-ID:
<3d49ec08_1@dnews>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!sn-xit-04!supernews.com!news.maxwell.syr.edu!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!dnews!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10698b,35f59e22a7772b1a,start X-Google-Attributes: gid10698b,public X-Google-ArrivalTime: 2002-08-01 19:36:17 PST Reply-To: "Uros Obradovic" <ouros@hotmail.com> From: "Uros Obradovic" <ouros@hotmail.com> Newsgroups: borland.public.cppbuilder.database.ado Subject: Query problem Date: Thu, 1 Aug 2002 19:17:47 -0700 Lines: 22 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 NNTP-Posting-Host: 134.71.141.37 Message-ID: <3d49ec08_1@dnews> X-Trace: dnews 1028254728 134.71.141.37 (1 Aug 2002 19:18:48 -0700) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-01!sn-xit-04!supernews.com!news.maxwell.syr.edu!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!dnews!not-for-mail