Article View: borland.public.vdbase.data.sql
Article #744Re: local sql displaying nothing
From: Romain Strieff [TeamB]
Date: Thu, 09 Jul 1998 00:00
Date: Thu, 09 Jul 1998 00:00
31 lines
1641 bytes
1641 bytes
In article <6o023s$ik910@forums.borland.com>, sdegenaar@yahoo.com
grudgingly admits...
>
> I have written some embedded local sql and am having no luck. I have copied
> the results into a temp table just to see the results. If I use the ? I get
> the right value for location in the command window, and if I replace
> :location with "whatever" it also works. Can anyone see what I am doing
> wrong. The value of location should be like "Adelaide".
>
> location = form.rowset.fields["CHURCH"].value
> locInfo = new Query()
> locInfo.sql = 'SELECT DISTINCT c.CHURCH, f.CONFERENCE, u.UNIONSDA,
> d.DIVION ;
> FROM CUSTOMER AS x, CHURCH AS c, CONF AS f, SDAUNION AS u, DIVISION AS d
> ;
> WHERE c.CHURCH = :location
> AND c.CONFERENCE = f.CONFERENCE ;
> AND f.UNION_ID = u.UNION_ID ;
> AND u.DIV_ID = d.DIV_ID '
> locInfo.params[ "location" ] = location
> locInfo.active = true
> u=new updateset()
> u.source = locInfo.rowset
> u.destination = "temp.dbf"
> u.copy()
>
>
Mmm, did you try trimming the variable?
location = form.rowset.fields["CHURCH"].value.righttim()
--
Romain Strieff [TeamB]
Technical Details
Message-ID:
<MPG.100ede32ebbfe64898af46@forums.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<6o023s$ik910@forums.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: ff5a1,911f79df217c1b7 X-Google-Attributes: gidff5a1,public From: Romain@Do.not.reply.via.e-mail (Romain Strieff [TeamB]) Subject: Re: local sql displaying nothing Date: 1998/07/09 Message-ID: <MPG.100ede32ebbfe64898af46@forums.borland.com> X-Deja-AN: 369888698 References: <6o023s$ik910@forums.borland.com> Organization: TeamB Reply-To: teamb@opto-pps.com Newsgroups: borland.public.vdbase.data.sql