Dim mCCCond As New CCriteriaCondition
mCCCond.addSelectEqualTo("OIDUsuario", DatosGlobales.Usuario.OIDValue)
mRc.WhereCondition = mCCCond
mCursor = mRc.perform(mClaseACargar)
This code gives me an exception and debugging i could see that sql statement generated was
"SELECT [fieldslist ok] FROM WHERE [condition ok]".
the name of the table was ignored.
what am i doing wrong???
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Public Function listadoPedidosVenta(ByVal sql As String) As CCursor
'Recupera un listado de pedidos venta basado en una consulta
Dim rc As CRetrieveCriteria
Dim c As New PedidoVenta
Dim cursor As CCursor
c = New PedidoVenta
rc = New CRetrieveCriteria
rc.ClassMap = c.getClassMap
rc.WhereCondition.addSelectEqualTo("TipoDocumento", sql)
'rc.ReturnFullObjects = True
cursor = rc.perform(c)
Return cursor
End Function
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Dim mCCCond As New CCriteriaCondition
mCCCond.addSelectEqualTo("OIDUsuario", DatosGlobales.Usuario.OIDValue)
mRc.WhereCondition = mCCCond
mCursor = mRc.perform(mClaseACargar)
This code gives me an exception and debugging i could see that sql statement generated was
"SELECT [fieldslist ok] FROM WHERE [condition ok]".
the name of the table was ignored.
what am i doing wrong???
Hi (Hola).
YOur problem is that need the object over query.
I have an example:
Public Function listadoPedidosVenta(ByVal sql As String) As CCursor
'Recupera un listado de pedidos venta basado en una consulta
Dim rc As CRetrieveCriteria
Dim c As New PedidoVenta
Dim cursor As CCursor
c = New PedidoVenta
rc = New CRetrieveCriteria
rc.ClassMap = c.getClassMap
rc.WhereCondition.addSelectEqualTo("TipoDocumento", sql)
'rc.ReturnFullObjects = True
cursor = rc.perform(c)
Return cursor
End Function
gracias, rapaz
Funciono de p*** madre.
Un saludo