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"!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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"!
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.
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