49 virtual int Run(
void);
60 unique_ptr<CDB_Connection> con(my_context.
Connect(
"msdev1",
65 unique_ptr<CDB_RPCCmd> rcmd(con->RPC(
"sp_who"));
68 while (rcmd->HasMoreResults()) {
69 unique_ptr<CDB_Result>
r(rcmd->Result());
75 for (
unsigned int j = 0; j <
r->NofItems(); j++) {
80 cout <<
r->ItemName(j) <<
": " << r_vc.
AsString()
87 cout <<
r->ItemName(j) <<
": " << r_in.
Value() <<
' ';
107 int main(
int argc,
const char* argv[])
virtual int Run(void)
Run the application.
virtual ~COdbcSpwhoDemoApp(void)
#define DBLB_INSTALL_DEFAULT()
Easy-to-use macro to install the default DBAPI service mapper.
int AppMain(int argc, const char *const *argv, const char *const *envp=0, EAppDiagStream diag=eDS_Default, const char *conf=NcbiEmptyCStr, const string &name=NcbiEmptyString)
Main function (entry point) for the NCBI application.
virtual bool HandleIt(CDB_Exception *ex)
Handle the exceptions resulting from a native API call, one-by-one.
CDB_Connection * Connect(const string &srv_name, const string &user_name, const string &passwd, TConnectionMode mode, bool reusable=false, const string &pool_name=kEmptyStr)
Create new connection to specified server (or service) within this context.
const string & AsString(void) const
Defines the CNcbiApplication and CAppException classes for creating NCBI applications.
double r(size_t dimension_, const Int4 *score_, const double *prob_, double theta_)
int main(int argc, const char *argv[])