πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.vdbase.data.sql
Article #1083

Use of variable for field name in sql filter

#1083
From: Nedim Buyukmihci
Date: Tue, 28 Apr 1998 00:00
23 lines
1161 bytes
VdB 7.01 (b1419)

Is there no way to use a variable for the field name in an sql filter?

If I do the following:

  form.rowset.filterOptions := 2
  form.rowset.filter := "middle_name = " + ['] + 'b.' + [']

everything works fine.

But, if I use a variable, no matter how I configure the statement, the
field name is determined to be "undefined". For example:

  pctest = 'Middle_name'

then, any of these three results in "middle_name undefined"
  form.rowset.filter := ["] + pctest + [= 'b.'"]
  form.rowset.filter := ["] + &pctest. + [= 'b.'"]
  form.rowset.filter := ["] + &pctest. + [= "] + 'b.'

Ned
Technical Details
Message-ID: <354612d7.7615375@forums.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: ff5a1,c246b502811359c7,start
X-Google-Attributes: gidff5a1,public
From: ncbuyukmihci@ucdavis.edu (Nedim Buyukmihci)
Subject: Use of variable for field name in sql filter
Date: 1998/04/28
Message-ID: <354612d7.7615375@forums.borland.com>
X-Deja-AN: 348479685
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset=us-ascii
Organization: PigByte DataοΏ½
Mime-Version: 1.0
Reply-To: ncbuyukmihci@ucdavis.edu
Newsgroups: borland.public.vdbase.data.sql