Jump to content

Recommended Posts

Posted

Tunidbedit onchange event doen't raise.

 

Hi,

 

Can you clarify your issue ?!

 

Sorry, for example this works:

procedure TMainForm.UniDBEdit1Change(Sender: TObject);
begin
  //
end;

Best regards.

Posted

this code is in onchange event of the unidbedit, but never execute.

 

 

procedure Tfalbaranesv.xalbaChange(Sender: TObject);
begin
    try
      qlin.close;
      qlin.sql.clear;
      qlin.sql.add('select a.albaran, a.linea, a.facturado, a.cod_articulo, b.alias, a.cantidad, a.precio, a.descuento, a.cod_moneda, a.importe, c.des_um, a.lote, a.nlote, a.nsublote, a.iorg_id, a.cod_almacen, a.cod_ubicacion,');
      qlin.sql.add('a.iorg_id2, a.cod_almacen2, a.cod_ubicacion2, a.descripcion, a.acidez, a.facturable, a.mdep');
      qlin.sql.add('from lalbaranesv_t a, articulos_t b, unidades_t c');
      qlin.sql.add('where a.albaran = :c1');
      qlin.sql.add('and a.org_id = :c2');
      qlin.sql.add('and a.cod_articulo = b.cod_articulo');
      qlin.sql.add('and a.cod_um = c.cod_um');
      qlin.sql.add('order by a.albaran, a.linea');
      qlin.parambyname('c1').asstring := qcab.FieldByName('albaran').asstring;
      qlin.parambyname('c2').asinteger := qcab.FieldByName('org_id').asinteger;

      qlin.open;
      qlin.first;
    except on E : Exception do begin
       showmessage(E.Message);
       end;
    end;
  end;
end;
 

Posted

Could you look at event connected this procedure in object inspector. Maybe somehow it was deleted.

 

if it's connected. could you write a different code. show a message maybe.

 

and is this effective write a query in change effect? I mean it's work everytime changed. every letter this code goes server, executed, goes back.

Posted

I notice your sql's some part goes incorrect. for example when you add from part there is no space. so it will added after sql like

"a.iorg_id2, a.cod_almacen2, a.cod_ubicacion2, a.descripcion, a.acidez, a.facturable, a.mdepfrom lalbaranesv_t a, articulos_t b, unidades_t c"

 

try add a space before add sql like

qlin.sql.add(' from lalbaranesv_t a, articulos_t b, unidades_t c');
Posted

the onchange event of the unidbedit, doesn't raise.

 

If I put a unibutton, that manually do the same that the event of the unidbedit, the button click works.

 

but the onchange event, not.

Posted

ok.

 

the onchange event raise, when the user change the valur, not when the value changes.

 

in a dataset.next, the dbedit gets the new value of the field, but not raise the onchange event.

 

this not occurs in a normal vcl application.

 

any workaround?

Posted

ok.

 

I've inserted the code of the onchange event if the dbedit, in the afterscroll of the dataset, and now I've that I want.

 

This is for 2 grids, master detail, and charge the detail after every change in master.

 

Thanks.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...