Article View: borland.public.vdbase.data.sql
Article #1450Re: Opening tables at runtime
From: Erich greiner
Date: Mon, 29 Dec 1997 00:00
Date: Mon, 29 Dec 1997 00:00
46 lines
2332 bytes
2332 bytes
Saveli Kossenko wrote: > > If you want to open Table "on the fly" do this: > Form.Query1.SQL="SELECT * FROM MYTABLE" > or > Form.Query1.SQL="SELECT * FROM "+ sMYTABLE > and > Form.Query1.Active=.t. > > In your example you have to create two queries and change SQL string of > second query "on the fly"... > But may be you can play with the Filter property of the second query... > > With best Regards, > Saveli Kossenko > > Erich greiner wrote in message <34A487DB.225F@t-online.de>... > >New with VdB7 I have problems opening databases at runtime. > >Converting my application, I have a form which open a master table > >at page 1 for editing datas and also shows in a listbox the table > >names of related tables for selecting. > >At form page 2 I like to open this related table, selecting from a > >second listbox the reccounts to work on it. > >I understand that I have to use queries for linking tables to the > >form. > >Previously I stored the field content (table name) in a variable > >and used the makro operator "&" to open it, but this is not working. > >Anybody can help me? > >Thanks > >Erich Greiner Thank you very mutch for the tip reg. opening tables "on the fly", it works. I have to preload the variable sMYTABLE with a valid table name because at the time there is access to the first table the second query is already initiated I think.(?) I found no Filter property of the query as you noted. New with OOP, I have one more question: Linking tables to a form with queries, there is no access to fields which are not linked to the form, no way found. Previously I used the syntax "TABLE_name->FIELD_name" to work on it. Is there an other way or have all fields to be linked to the form ? Thank you Best Regards Erich Greiner
Technical Details
Message-ID:
<34A883C1.2B98@t-online.de>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<34A487DB.225F@t-online.de> <684jc8$nic2@forums.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: ff5a1,a86db8beb830ff10 X-Google-Attributes: gidff5a1,public From: Erich greiner <Erich.Greiner@t-online.de> Subject: Re: Opening tables at runtime Date: 1997/12/29 Message-ID: <34A883C1.2B98@t-online.de> X-Deja-AN: 311109635 Content-Transfer-Encoding: 7bit References: <34A487DB.225F@t-online.de> <684jc8$nic2@forums.borland.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Organization: None Newsgroups: borland.public.vdbase.data.sql