Article View: borland.public.vdbase.data.sql
Article #1384Re: Using Variables in SQL statements
From: Ken Chan
Date: Mon, 12 Jan 1998 00:00
Date: Mon, 12 Jan 1998 00:00
26 lines
1447 bytes
1447 bytes
Judy and Frank Button wrote:
> 1) Anytime I try to edit the SQL from the inspector as I close the
> editor I get an error " variable mYearPaid not Defined". I close anyway
> and the Active property resets to False from True and when I open the
> Params property the data type has changed from Numeric to Logical.
Try this: set the active to false first, then change the SQL to include
the parameter. Go the params property and set the value. Then set the
active property to true.
> 2) Once I have conquered this problem I am going to want to change the
> value of mYearPaid to be able to vary the results of the query. I was
> going to use a PushButton on Click event. Will that work??
Sure. In the onClick, change the value in the params array. Then
requery(), something like:
function someButton_onClick()
form.L28CLASS1.params[ "mYearPaid" ] = form.entryfield1.value
form.L28CLASS1.requery()
--
//Ken[0]@Borland
<Please follow-up to newsgroup; do not reply to email>
Technical Details
Message-ID:
<MPG.f2471f31c4d732b9897a7@forums.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<34B8F5DD.C6323712@globalserve.net>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: ff5a1,32974d6c1392a356 X-Google-Attributes: gidff5a1,public From: supportinfo@borland.com (Ken Chan) Subject: Re: Using Variables in SQL statements Date: 1998/01/12 Message-ID: <MPG.f2471f31c4d732b9897a7@forums.borland.com> X-Deja-AN: 315429439 References: <34B8F5DD.C6323712@globalserve.net> Organization: Borland Newsgroups: borland.public.vdbase.data.sql