Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Buffering
Message
 
À
01/02/2007 18:53:41
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
01191514
Message ID:
01191704
Vues:
18
Here some modifications:
*** Form INIT EVENT:
IF NOT thisform.DefineCA()
   RETURN .f.
ENDIF

select CA1
thisform.df_tabs1.df_page1.grdBiditems.recordsourcetype = 1
thisform.df_tabs1.df_page1.grdBiditems.recordsource = "CA1"
thisform.df_tabs1.df_page1.grdBiditems.column1.ControlSource = 'CA1.lineitemid_b'
thisform.df_tabs1.df_page1.grdBiditems.column2.ControlSource = 'CA1.lineitemname_b'
thisform.df_tabs1.df_page1.grdBiditems.column3.ControlSource = 'CA1.lineitemqty'
thisform.df_tabs1.df_page1.grdBiditems.column4.ControlSource = 'CA1.lineitemest'

********* END of INIT event of the form



*** Form DefineCA Method
this.addproperty('oCA')
this.oCa = createobject([CursorAdapter])

text TO this.oCa.SelectCmd PRETEXT 15 NOSHOW
       select * from biditems 
        inner join lineitemspecs 
        on biditems.lineitemid = lineitemspecs.lineitemid 
        where biditems.projectphaseid = ?m.lnValue
ENDTEXT

this.oCa.allowinsert        = .t.
this.oCa.insertcmd        = ""
this.oCa.buffermodeoverride = 3                && 3 = row buffering, 5 = table buffering
this.oCa.datasourcetype = [NATIVE]            && native fox datasource
this.oCa.sendupdates    = .t.                && unnecessary except with ODBC or ADO
this.oCa.wheretype      = 1                &&
this.oCa.tables         = [test_financing]     &&
this.oCa.fetchsize      = -1                && primarily for remote views
this.oCa.keyfieldlist   = [biditemid]            && the primary key for the table
this.oCa.updatenamelist =     "lineitemest biditems.lineitemest," + ;
                              "lineitemqty bidirems.lineitemqty"

m.lnValue = 0
this.oCa.updatablefieldlist = "lineitemest, lineitemqty"
this.oCa.alias              = "CA1"

IF NOT this.oCa.cursorfill()
   AERROR(laError)
   MESSAGEBOX([Can not open CursorAdapter ] +laError[1,2])
   RETURN .f.
ENDIF
RETURN .t.
************* END OF DefineCA Method


***** ComboBox InteractiveChange Event
m.lnValue = val(this.value)
IF NOT thisform.oCA.CursorRefresh()
   AERROR(laError)
   MESSAGEBOX([Can not refresh CursorAdapter ] +laError[1,2])
   RETURN .f.
ENDIF
thisform.df_tabs1.df_page1.grdBiditems.Refresh()

**** END of ComboBox InteractiveChange Event
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform