$answer = $oConn->ExecuteSQL(@$_POST['SQL'], @$_POST['MaxRows']); break; case 'GetODBCDSNs': $answer = $oConn->GetDatabaseList(); break; case 'SupportsProcedure': $answer = $oConn->SupportsProcedure(); break; case 'GetProviderTypes': $answer = $oConn->GetProviderTypes(); break; case 'GetViews': $answer = $oConn->GetViews(@$_POST['Database']); break; case 'GetProcedures': $answer = $oConn->GetProcedures(@$_POST['Database']); break; case 'GetParametersOfProcedure': $answer = $oConn->GetParametersOfProcedure(@$_POST['ProcName']); break; case 'ReturnsResultset': $answer = $oConn->ReturnsResultSet($_POST['RRProcName']); break; case 'ExecuteSP': $answer = $oConn->ExecuteSP(@$_POST['ExecProcName'], 0, @$_POST['ExecProcParameters']); break; case 'GetKeysOfTable': $answer = $oConn->GetPrimaryKeysOfTable(@$_POST['TableName']); break; default: $answer = create_error('The \'' . $_POST['opCode'] . '\' command is not supported.');
if ($_POST['opCode'] == "GetTables") { echo $oConn->GetTables(); } elseif ($_POST['opCode'] == "GetColsOfTable") { echo $oConn->GetColumnsOfTable($_POST['TableName']); } elseif ($_POST['opCode'] == "ExecuteSQL") { echo $oConn->ExecuteSQL($_POST['SQL'], $_POST['MaxRows']); } elseif ($_POST['opCode'] == "GetODBCDSNs") { echo $oConn->GetDatabaseList(); } elseif ($_POST['opCode'] == "SupportsProcedure") { echo $oConn->SupportsProcedure(); } elseif ($_POST['opCode'] == "GetProviderTypes") { echo $oConn->GetProviderTypes(); } elseif ($_POST['opCode'] == "GetViews") { echo $oConn->GetViews(); } elseif ($_POST['opCode'] == "GetProcedures") { echo $oConn->GetProcedures(); } elseif ($_POST['opCode'] == "GetParametersOfProcedure") { echo $oConn->GetParametersOfProcedure($_POST['ProcName']); } elseif ($_POST['opCode'] == "ReturnsResultset") { echo $oConn->ReturnsResultSet($_POST['RRProcName']); } elseif ($_POST['opCode'] == "ExecuteSP") { echo $oConn->ExecuteSP($_POST['ExecProcName'], 0, $_POST['ExecProcParameters']); } elseif ($_POST['opCode'] == "GetKeysOfTable") { echo $oConn->GetPrimaryKeysOfTable($_POST['TableName']); } } // if (!$oConn->isOpen) // handle exception is actually called by TestOpen, so this call is not needed // echo($oConn->HandleException()); $oConn->Close(); }
$answer = $oConn->ExecuteSQL(@$_POST['SQL'], @$_POST['MaxRows']); break; case 'GetODBCDSNs': $answer = $oConn->GetDatabaseList(); break; case 'SupportsProcedure': $answer = $oConn->SupportsProcedure(); break; case 'GetProviderTypes': $answer = $oConn->GetProviderTypes(); break; case 'GetViews': $answer = $oConn->GetViews(); break; case 'GetProcedures': $answer = $oConn->GetProcedures(); break; case 'GetParametersOfProcedure': $answer = $oConn->GetParametersOfProcedure(@$_POST['ProcName']); break; case 'ReturnsResultset': $answer = $oConn->ReturnsResultSet($_POST['RRProcName']); break; case 'ExecuteSP': $answer = $oConn->ExecuteSP(@$_POST['ExecProcName'], 0, @$_POST['ExecProcParameters']); break; case 'GetKeysOfTable': $answer = $oConn->GetPrimaryKeysOfTable(@$_POST['TableName']); break; default: $answer = create_error('The \'' . $_POST['opCode'] . '\' command is not supported.');