General information
Category:
Coding, syntax & commands
Title:
Modifying a data tier
Hello
I am modifying a data tier class which its code is the following:
PRE
#INCLUDE foxpro.h
DEFINE CLASS CapaDatos as Session OlePublic
PROTECTED miConeccion
miConeccion = ""
Procedure Conectar
oConeccion = CREATEOBJECT("adodb.connection")
* VFP Source
*oConeccion.Open("Provider=VFPOLEDB.1;Data Source=D:\Universal Thread\Ejemplo\Ejemplo.dbc;Password='';Collating Sequence=MACHINE")
* Access Source
oConeccion.Open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\Universal Thread\Ejemplo\Access.mdb;Persist Security Info=False")
This.miConeccion = oConeccion
EndProc
Procedure CargaLista() as ADODB.Recordset
oRecordset=CREATEOBJECT("adodb.recordset")
oRecordset.Open("SELECT idCliente, Apnombre;
from Cliente", This.miConeccion)
RETURN oRecordset
EndProc
Procedure EstadoCuenta( miCliente as String ) as ADODB.Recordset
oRecordCta=CREATEOBJECT("adodb.recordset")
oRecordCta.Open("SELECT Cliente.idcliente, Cliente.apnombre,;
Cliente.limcredito, EstadoCuenta.saldocuenta;
from Cliente, EstadoCuenta;
Where Cliente.idCliente = '"+micliente+"';
and Cliente.idCliente = EstadoCuenta.idCliente",;
This.miConeccion)
RETURN oRecordCta
EndProc
ENDDEFINE
PRE
I WAN TO ADD A PROCEDURE TO APPEND, A PROC. TO MODIFYING AND a PROC TO DELETE , HOW I CAN DO THIS?
Thank you
Luis Martin
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only