Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
RSToCursor limited to 73 fields?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Problèmes
Divers
Thread ID:
00885790
Message ID:
00886257
Vues:
12
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
>
>
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform