A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/dbapi__cursor_8cpp_source.html below:

NCBI C++ ToolKit: src/dbapi/driver/samples/dbapi_cursor/dbapi_cursor.cpp Source File

30 #include "../dbapi_sample_base.hpp" 58  const string

& blob_type);

75  sql

=

string

(

" IF EXISTS (select * from sysobjects WHERE name = '"

);

82  while

( lcmd->HasMoreResults() ) {

83

unique_ptr<CDB_Result>

r

(lcmd->Result());

88  sql

+=

" int_val int not null, \n"

;

89  sql

+=

" fl_val real not null, \n"

;

90  sql

+=

" date_val datetime not null, \n"

;

91  sql

+=

" str_val varchar(255) null, \n"

;

92  sql

+=

" txt_val "

+ blob_type +

" null, \n"

;

93  sql

+=

" primary key clustered(int_val) \n"

;

99  while

( lcmd->HasMoreResults() ) {

100

unique_ptr<CDB_Result>

r

(lcmd->Result());

111  if

(blob_type[0] ==

'n'

) {

114

pTxt.

Append

(

"This is a test string."

);

119

bcp->Bind(0, &int_val);

120

bcp->Bind(1, &fl_val);

121

bcp->Bind(2, &date_val);

122

bcp->Bind(3, &str_val);

127

fl_val = float(

i

+ 0.999);

128

date_val = date_val.

Value

();

159

txt.

Append

(

"This text will replace a text in the table."

);

160  for

(

int i

= 0;

i

< 4000; ++

i

) {

174

txt.

Append

(

" Let\xe2\x80\x99s make it long!"

);

180

unique_ptr<CDB_CursorCmd> upd(

GetConnection

().Cursor(

"upd"

,

182  " for update of txt_val"

, 0));

185

unique_ptr<CDB_Result> crres(upd->Open());

187  while

( crres->Fetch() ) {

190  if

( v.

Value

() == 2 ) {

193

upd->UpdateBlob(1, txt);

200

cout <<

"\n<RESULTSET blob_type=\""

<< blob_type <<

"\">\n\n"

;

201  ShowResults

(

"select int_val,fl_val,date_val,str_val,txt_val from "

+

203

cout <<

"</RESULTSET>\n"

;

237 int main

(

int

argc,

const char

* argv[])

int RunOneSample(const string &blob_type)

string GetTableName(void) const

virtual ~CDbapiCursorApp(void)

void CreateTable(const string &table_name, const string &blob_type)

function CreateTable is creating table in the database

virtual int RunSample(void)

void DeleteTable(const string &table_name)

I_DriverContext & GetDriverContext(void)

Get the driver context (for the driver specified in the command line)

void SetDatabaseParameter(const string &name, const string &value)

Set database connection parameter.

const string & GetDriverName(void) const

Return current driver name.

CDB_Connection & GetConnection(void)

Get connection created using server, username and password specified in the application command line.

EServerType GetServerType(void) const

Return current server type.

void ShowResults(const string &query)

Delete table if it exists ShowResults is printing resuts on screen.

int main(int argc, const char *argv[])

static const char table_name[]

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.

static CDB_UserHandler & GetDefault(void)

virtual bool HandleIt(CDB_Exception *ex)=0

Handle the exceptions resulting from a native API call, one-by-one.

virtual bool SetMaxBlobSize(size_t nof_bytes)=0

Set maximal size for BLOB data.

virtual size_t Append(const void *buff, size_t nof_bytes)

virtual bool MoveTo(size_t byte_number)

const CTime & Value(void) const

void SetEncoding(EBulkEnc e)

@ eCurrent

Use current time. See also CCurrentTime.

double r(size_t dimension_, const Int4 *score_, const double *prob_, double theta_)


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4