Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grids and error
Message
 
To
13/10/2006 13:47:25
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
01161719
Message ID:
01161875
Views:
22
Mostly because I was unsure of its effect on the predefined column objects.

>Richard,
>You have an SQL. Why not directly using the SQL as recordsource and refresh with:
>
>.RecordSource = .RecordSource
>
>Cetin
>
>>All of the below is contained within a WITH_ENDWITH on the grid.
>>
>>
>>	IF USED('curDisplay')
>>		lnCurrentRow = RECNO('curDisplay')
>>
>>	ELSE
>>		lnCurrentRow = 1
>>	
>>	ENDIF
>>	
>>	lsSQL = 	"SELECT curWorking.UniqueID, curWorking.IsSelected, " +;
>>			"curWorking.Invert, curWorking.IsRestricted, " +;
>>			"!ISNULL(curWorking.Annotation) as HasNote," +;
>>			"TTOD(curWorking.ClearDate) AS ClearDate, curRecon.SWDN, " +;
>>			"curRecon.PrimaryDoc, curRecon.CAAmount, curRecon.DAAmount, " +;
>>			"curRecon.AuditDate, " +;
>>			"curRecon.MachineDate, curRecon.SecondaryDoc, curRecon.Site, " +;
>>			"curRecon.Source, curRecon.GLC, curRecon.ReconMonth, " +;
>>			"curRecon.TransactionType, curRecon.LastRFA " +;
>>		   	"FROM curWorking " +;
>>		   	"INNER JOIN curRecon ON curWorking.UniqueID = curRecon.UniqueID " +;
>>		   	"INTO CURSOR curDisplay READWRITE " +;
>>		   	"WHERE ISNULL(curWorking.MatchedTo) AND " +;
>>		   	"curRecon.RecordType = '" + lsRecordType + "' AND " +;
>>			"ALLTRIM(curRecon.Account + NVL(curRecon.CFI,'')) == '" + lsAccount + "' "+;
>>			IIF(THIS.Parent.chkDisplayCleared.Value, "" ,;
>>				"AND ISNULL(curWorking.ClearDate) ") +;
>>			"ORDER BY " + .SortOrder + " " + .SortDirection
>>
>>	.RecordSource =  ''
>>
>>	&lsSQL.
>>
>>	IF !USED('curDisplay')
>>		MESSAGEBOX("The Display cursor failed. Contact programmer. DO NOT CLOSE THIS!" + CR+;
>>				lsSQL)
>>
>>	ENDIF
>>
>>	.RecordSource = 'curDisplay'
>>	.grcSelect.ControlSource = 'curDisplay.IsSelected'
>>	.grcReversed.ControlSource= 'curDisplay.Invert'
>>...
>>
>>
>>I'm also trying it with the permanent cursor method... BUT I'm running into a case where it's doubling the records. That may be a case of me running through some of the nuances of that method.
>>
>>Richard
>>
>>
>>
>>>>The Form will open and display data. It is happening during a requery of the data source. Similar code works throughout this application with zero problems. I did have a problem at one point with losing my columns but that problem has been solved. This one has just started.
>>>>
>>>>Possibility of a corrupt Form file?
>>>>
>>>>Richard
>>>
>>>What is the source for the grid? Would you please post a bit of code where the problem occurs?
>>>
>>>AFAIK, if you're using local view for your grid and do requery(), the grid should work just fine. I think the similar case would be with remote views, but I'm not certain.
State of Florida, DCF
Previous
Reply
Map
View

Click here to load this message in the networking platform