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:
00886257
Views:
11
I'm upgrading to VFP 8.0 today, so your function come just in time.

Merci Stéphane.

>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
>
>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform