Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
RSToCursor limited to 73 fields?
Message
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00885790
Message ID:
00886255
Views:
18
Sylvain,

One day i was tired of VFPCom glitches and problems with backward compatibility, so since VFP 8 i created this function instead of using VFPCom:
Function RsToCursor( oRs, cAlias )


	LOCAL loCursor, lcCursor, lcAlias
	Try 
		lcCursor = Sys(2015)
		lcAlias=IIF( Type('cAlias') = 'C', cAlias, Sys(2015) )
		loCursor = CREATEOBJECT("CursorAdapter")
		WITH loCursor

			.DataSourceType="ADO"
			.Alias = lcCursor
			.CURSORFILL(.F., .F., 0, oRs)

		ENDWITH
		
		If Used(lcCursor)
			Select * From (lcCursor) Into Cursor (lcAlias) READWRITE
		EndIf
		
	Catch
	Finally
		loCursor = null
		loRs=null
	EndTry
			
	Return Iif( Used(lcAlias), 1, -1 )
	
EndFunc
>VFP 7.0
>
>RSToCursor () doesn't do anything when there is more than 73 fields in the recordset. No error, no cursor created, nothing. Is it limited to 73 fields or is there something I am doing wrong?
>
>TIA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform