Menu

I can't work with XmlRpcValue string

Help
Anonymous
2003-11-10
2003-11-11
  • Anonymous

    Anonymous - 2003-11-10

    Help me! As I can transform XmlRpcValue of params[0] to a kind of string (char *str) for performance of operation with a database
        while(!recordset.IsEOF()) // Do until EOF
        {
            recordset.GetFieldValue(str,var);
            Client = (LPCSTR)var.pbstrVal;
        }
    I can not use expression:
            recordset.GetFieldValue(params[0],var);

    At the moment of performance of the program I have  "type error"!

     
    • Anonymous

      Anonymous - 2003-11-10

      I believe all you would have to do is cast the params[0] to a string in your expression.

      recordset.GetFieldValue((char*)params[0],var);

      The '=' operator does this casting for you, which is why you can assign it to str with no problem.

      Try that and see if it will work.

       
    • Anonymous

      Anonymous - 2003-11-11

      Thank, Melissa, for your answer. But in this case I receive a error of the C-compiler:
      "error C2440: 'type cast' : cannot convert from 'class XmlRpc::XmlRpcValue' to 'char *'
              No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called"
      Best regards!
      Sergej Dunaev

       

Log in to post a comment.