Article View: borland.public.vdbase.data.sql
Article #1352Re: Query parameters
From: Bowen Moursund
Date: Mon, 09 Feb 1998 00:00
Date: Mon, 09 Feb 1998 00:00
24 lines
1251 bytes
1251 bytes
>When i run this query, an error message display: >" Variable sCod not defined " >but sCod is defined as a PUBLIC char variable (ex. value is 'LC1') > >--Database:CONDO >SELECT (INQ + ' - ') + COGN LB_INQU, COGN, COD >FROM "inqu.dbf" Inqu >where Inqu.COD = :sCod >ORDER BY COD, COGN The following worked for me, from the command line: cParm = "Fish" select * from SAMPLE where SAMPLE = :cParm Are you perhaps using the above as the sql property of a query object? If so, you must pass the parameter using the query object's params array, e.g.: QueryObj.params["sCod"] = sCod __ Bowen Moursund (TeamB) bowen.NOSPAM@nerds.com http://www.mindspring.com/~bowenm/datatech.htm
Technical Details
Message-ID:
<6bncg7$d3l7@forums.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<34DF082C.7CC4@mbox.vol.it>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: ff5a1,5beab218a550fa1c X-Google-Attributes: gidff5a1,public From: "Bowen Moursund" <teamb@opto-pps.com> Subject: Re: Query parameters Date: 1998/02/09 Message-ID: <6bncg7$d3l7@forums.borland.com> X-Deja-AN: 323474834 Content-Transfer-Encoding: 7bit References: <34DF082C.7CC4@mbox.vol.it> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4 Organization: DataTech Newsgroups: borland.public.vdbase.data.sql