Recent

Author Topic: JV PageList on show  (Read 1371 times)

eldonfsr

  • Sr. Member
  • ****
  • Posts: 446
JV PageList on show
« on: September 05, 2021, 07:00:31 pm »
Hi i testing Jv component i found a pagelist witch is like page and tab control, I found a problem when i trying to active sqldb on show event sent me this error.
Code: Pascal  [Select][+][-]
  1. procedure TFormMain.JvSPSupliersShow(Sender: TObject);
  2. begin
  3.  if ( DM.SQLQSup.Active = true) then begin
  4.      DM.SQLQSup.Open;
  5.  end else begin
  6.     DM.SQLQSup.close;
  7.     DM.SQLQSup.Open;
  8.  end;
  9. end;  
  10.  

where is better place to open a dbsql... or active .


wp

  • Hero Member
  • *****
  • Posts: 11853
Re: JV PageList on show
« Reply #1 on: September 06, 2021, 10:46:35 am »
Does the datamodule already exist when this code is called? Go to the project options, section "Forms", and drag the datamodule above the main form so that it is auto-created before the mainform, or manually create the datamodule sufficiently early.

I don't know the logics in your applications and thus cannot help you with the best place to open the sql database.

eldonfsr

  • Sr. Member
  • ****
  • Posts: 446
Re: JV PageList on show
« Reply #2 on: September 06, 2021, 06:44:02 pm »
Ok Thanks was great help is my first app using data modelue i move that top op forms and working  now let me continue with make more test......

regards
Fernando

 

TinyPortal © 2005-2018