Article View: borland.public.vdbase.forms
Article #320Re: Changing Tables at Runtime
From: Ulli Dittmer
Date: Wed, 24 Feb 1999 00:00
Date: Wed, 24 Feb 1999 00:00
27 lines
1366 bytes
1366 bytes
>>function NewTable_OnClick >> form.view = ":database:newtable.dbf" >> form.datamodref1.ref.query1.active = false >> form.datamodref1.ref.query1.sql = ' select * from "newtable.dbf" ' >> form.datamodref1.ref.query1.active = true >> >>This worked sometimes but mostly it didn�t. Instead I get a form with empty >>entryfields and no connection to any table. > >Closing the query also severs the controls' datalinks to its rowset's >fields. You must reassert the datalink properties of the controls after >reactivating the query. >__ Ok, so the datalinks were the problem. I cut out "form.view....." and changed the code to the following: function NewTable_OnClick form.datamodref1.ref.query1.sql = ' select * from "newtable.dbf" ' form.datamodref1.ref.query1.requery() Now it works perfectly! Ulli
Technical Details
Message-ID:
<7b0koh$73b7@forums.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<7audkl$2nl6@forums.borland.com> <7auk78$2nh11@forums.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII X-Google-Thread: 15bdfb,e812e6f8733dbb1b X-Google-Attributes: gid15bdfb,public From: "Ulli Dittmer" <UCA.Dittmer@T-Online.de> Subject: Re: Changing Tables at Runtime Date: 1999/02/24 Message-ID: <7b0koh$73b7@forums.borland.com> X-Deja-AN: 447839538 References: <7audkl$2nl6@forums.borland.com> <7auk78$2nh11@forums.borland.com> X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2106.4 Organization: Another Netscape Collabra Server User Newsgroups: borland.public.vdbase.forms