🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Vdb variables in SQL statements

#1409
From: Tom Arnold
Date: Mon, 26 Jan 1998 00:00
50 lines
1903 bytes
Found it.  Check the following:

   this.QUERY1 = new QUERY()
   this.QUERY1.parent = this
   with (this.QUERY1)
      left = 23
      top = 2.5
   endwith

   this.rowset = this.aircraft1.rowset

   function form_onOpen    
     u = new UpdateSet()  
      u.source = form.aircraft1.rowset
      foo = funique('Temp????.dbf')
      u.destination = foo
      u.copy()   
      msgbox(foo+' Exists? - '+file(foo))     
      with (form.QUERY1)
          sql = 'SELECT * FROM &foo'
          active = true
      endwith
      msgbox("Done")
      return

Note the code &foo, without the dot or quotes.  However the key was also
that the FD had streamed out the database property for Query1 even
though there was no reference to the database.  When that property was
removed, the sql statement looked in the local file and found &foo, but
not foo by itself.  I am a little suprised at that, but if it works, it
works.
-- 
   Tom 
   Bena, VA

Bowen Moursund wrote:
> 
> >          sql = 'SELECT * FROM foo'
> 
> if 'foo' is a variable, try using &macro substitution, e.g.:
> 
>   sql = 'select * from "&foo."'
> ____
> Bowen Moursund (TeamB)
> bowenNOSPAM@nerds.com
> http://www.mindspring.com/~bowenm/datatech.htm

To reply email, please remove the KILL.SPAM from my address.  Not
necessary for NGs
Technical Details
Message-ID: <34CCBCED.7957@inna.net>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <34CA5957.6338@inna.net> <6agtr8$qg94@forums.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: ff5a1,55c42f16f0b042e2
X-Google-Attributes: gidff5a1,public
From: Tom Arnold <tarnold@inna.net>
Subject: Re: Vdb variables in SQL statements
Date: 1998/01/26
Message-ID: <34CCBCED.7957@inna.net>
X-Deja-AN: 319407153
Content-Transfer-Encoding: 7bit
References: <34CA5957.6338@inna.net> <6agtr8$qg94@forums.borland.com>
Mime-Version: 1.0
Reply-To: KILL.SPAM.tarnold@inna.net
Content-Type: text/plain; charset=us-ascii
Organization: Microaid
Newsgroups: borland.public.vdbase.data.sql