QMOConv()

Top  Previous  Next

 

The QMOConv() function converts data to external form using a conversion code. It is analogous to the QMBasic OCONV() function.

 

 

Format

 

VBQMOConv(ByVal Data as String, ByVal Code as String) as String

 

Cchar * QMOConv(char * Data, char * Code)

 

ObjStr = Session->OConv(Data, Code)

 

where

 

Datais the data to be converted.

 

Codeis the conversion code to be applied.

 

 

The QMOConv() function returns a string representing the converted data. The QMStatus() function returns zero after a successful conversion. A non-zero value indicates an error as described for OCONV().

 

This function is evaluated on the server system to ensure access to all conversion codes and hence requires that a server connection is open.

 

 

Examples

 

VB

ExttDate = QMOConv(dt, "D2DMY")

C

ExtDate = QMOConv(dt, "D2DMY")

QMBasic

ExtDate = session->OConv(dt, D2DMY")

 

The above example converts an internal form data in the dt variable to external form, storing this in IntDate. Note that the returned value from QMOConv() is always a string. When using the C API, the memory occupied by this string must be released using QMFree() when no longer needed.

 

 

See also:

QMIConv()