Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Dll not return a cursor
Message
 
 
À
23/03/2010 14:51:07
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Versions des environnements
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01456719
Message ID:
01456720
Vues:
50
>hi
>I have a dll a cap of data and want that this one returns a cursor and not recordset but not because he does not return the alone cursor to me he returns to me .t.
>
>here code.
>
>
>if type("nalias")='C'
>	ocursor=this.rstodbf(nalias,lors)
>	return ocursor
>endif
>
>procedure rstodbf(calias,lorst)
>	if used(calias)
>		select (calias)
>		use
>	endif
>	talias="CA"+sys(2015)
>	try
>		ocursoradapter = createobject("CursorAdapter")
>		ocursoradapter.alias=talias
>		ocursoradapter.allowdelete    = .t.
>		ocursoradapter.allowinsert    = .t.
>		ocursoradapter.allowupdate    = .t.
>		ocursoradapter.datasourcetype="ADO"
>		ocursoradapter.cursorfill(,,,lorst)
>		ocursoradapter.cursordetach()
>	catch to loerror
>		messagebox(loerror.message)
>	endtry
>	select * from (talias) into cursor (calias) readwrite
>	select (talias)
>	use
>	return (calias)
>	endpro
Your current code is returning an alias (return (cAlias)) - it doesn't return an object.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform