Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Class definition ..... is not found...
Message
 
 
To
18/05/2002 17:47:54
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
00656668
Message ID:
00658620
Views:
29
Looks good to me. I've no idea what could be wrong.

>The code is the same from the example,
>
>Project CapaDatos, with .prg capadatos
>
DEFINE CLASS Capadatos as Session OlePublic
>	protected miConecion
>	
>	miConecion =""
>	
>	procedure conectar
>
>	cConnString="DRIVER={MySQL ODBC 3.51 Driver};Server=localhost;option=131609;Database=jbinf;UID=root;PASSWORD=root;"
>	oConnection = createobject("adodb.connection")
>	oConnection.ConnectionString=cConnString
>	oConnection.open()
>	this.miConecion=oConnection
>	EndProc
>	Procedure CargaLista() as ADODB.RecordSet
>		oRecordSet = createobject("ADODB.Recordset")
>		oRecordset.ActiveConnection = This.miConecion
>		*oRecordSet.CursorType = adOpenStatic
>		oRecordSet.LockType = adLockOptimistic
>		oRecordSet.CursorLocation = adUseClient
>		oRecordSet.CursorType = adOpenKeySet
>		oRecordSet.Open ("select * from cliente", this.miConecion)
>		return oRecordset		
>	EndProc
>EndDefine
>
>Project CapaNegocios, with .prg capanegocios
>
>DEFINE CLASS CapaNegocios as Session OlePublic
>	Procedure ListaClientes() as ADODB.RecordSet
>		oCapaDatos = CREATEOBJECT('capadatos.capadatos')
>		oCapadatos.Conectar()
>		miListaClientes = oCapadatos.cargaLista()
>		return miListaClientes
>	EndProc
>*	Procedure ConsultaEstadoCuenta( miCliente as string ) as ADODB.RecordSet
>*	EndProc
>EndDefine
>
>MyProject
>
>Call the object
>
>ocapanegocios=createobject("capanegocios.capanegocios")  ---> Error Here ???
>miRecordset=oCapaNegocios.ListaClientes()
>thisform.processa(miRecordSet)
>thisform.Refresh
>
>
>João Batista
--sb--
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform