Menu

i need help with WhereCondition

homer111
2005-01-21
2013-03-07
  • homer111

    homer111 - 2005-01-21

    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???

     
    • victor Saquicela

      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

       
    • homer111

      homer111 - 2005-01-21

      gracias, rapaz
      Funciono de p*** madre.

      Un saludo

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.