🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.intrabuilder.data.sql
1 messages
1 total messages Started by Peter Wilk Mon, 06 Apr 1998 00:00
bad documentation witj select fields
#63
Author: Peter Wilk
Date: Mon, 06 Apr 1998 00:00
57 lines
2083 bytes

please help,
  i've design the following custom component in intrabuilder - strictly
sticking to the
help file: however if i drop it on a form i encounter the probelm, that the
active property
is set to true which prvents me from setting the database property. on the
other hand if i
set the active property to false i get the error "invalid array index"
pointing to the
..fields["CAR_BRAND"] item ?
how to solve this ? - TIA peter
class qryCarCover extends Query custom {
   with (this) {
      sql = "SELECT * from CAR";
      active = true;
   }
   with (this.rowset) {
    fields["CAR_BRAND"].beforeGetValue = class::Brand_beforeGetValue
      fields["CAR_BRAND"].canChange = class::Brand_canChange
   }
   function onOpen()
   {
    with( this.qBrandnames = new Query() ) {
       sql = "SELECT * FROM BRAND";
         active = true;
      }
   }
   function Brand_beforeGetValue()
   {
    if (this.parent.parent.endOfSet) {
       return null;
      }
      else if (this.value == null) {
       return "";
      }
      else {
       var r = this.parent.parent.parent.qBrandnames.rowset;
         return r.applyLocate('BRAND_ID = ' + this.value) ?
r.fields["BRAND_name"].value : "unbekannte Marke";
      }
   }
   function Brand_canChange( Brand)
   {
    var r = this.parent.parent.qBrandname.rowset;
      if ( r.applyLocate('BRAND_name = \'' + Brand + '\'')) {
       this.value = r.fields["BRAND_ID"].value;
      }
      return false;
   }
}

--
Dr. Peter Wilk
Assistance and Insurance Consulting
http://ourworld.compuserve.com/homepages/PeterWilk
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads