Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Buffering
Message
 
 
To
01/02/2007 18:53:41
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Miscellaneous
Thread ID:
01191514
Message ID:
01191745
Views:
7
Your selectCMD would not work as you write it. CursorFill returns .f., so you don't have your cursor available.

SelectCMD should list all the fields and also where should be something like myPK = ?pcPK

pcPK should be declared private and be available at the time you execute your CursorFill method.

>>
>>But I prefer to use CursorAdapter. And when you add a parameter to it you only need it to CursorRefresh() it where that/these parameter(s) change.
>
>OK, I've written the following in the interactivechange event of the final combo, but I get an error that the cursor CA1 doesn't exist. I also tried adding INTO CURSOR CA1 as part of the select but that didn't work either. Can you spot the problem?
>btw - This is a varient of code you gave me a long time ago.
>
>
>this.Value = this.Value
>
>thisform.df_tabs1.df_page1.grdBiditems.recordsource = space(0)
>
>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 = val(this.value)
>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"
>						
>this.oCa.updatablefieldlist = "lineitemest, lineitemqty"
>this.oCa.alias              = "CA1"
>
>this.oCa.cursorfill()
>
>select CA1       && errors here
>
>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'
>
>
>thisform.Refresh
>
>dodefault()
>
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform