QMIConv()

Top  Previous  Next

 

The QMIConv() function converts data to internal form using a conversion code. It is analogous to the QMBasic ICONV() function.

 

 

Format

 

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

 

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

 

ObjStr = Session->IConv(Data, Code)

 

where

 

Datais the data to be converted.

 

Codeis the conversion code to be applied.

 

 

The QMIConv() 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 ICONV().

 

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

IntDate = QMIConv(dt, "D2DMY")

C

IntDate = QMIConv(dt, "D2DMY")

QMBasic

IntDate = session->IConv(dt, "D2DMY")

 

The above example converts an external form data in the dt variable to an internal day number, storing this in IntDate. Note that the returned value from QMIConv() 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:

QMOConv()