& proc_name) :
70 stringextra_msg =
"Procedure Name: "+ proc_name;
101 stringmain_exec_query(
"declare @STpROCrETURNsTATUS int;\nexec @STpROCrETURNsTATUS=");
103 stringparam_result_query;
113bindGuard, indicator)) {
117 stringerr_message =
"Cannot assign params."+
GetDbgInfo();
124q_str += main_exec_query +
";\nselect STpROCrETURNsTATUS=@STpROCrETURNsTATUS";
125 if(!param_result_query.empty()) {
126q_str +=
";\nselect "+ param_result_query;
147 stringerr_message =
"SQLExecDirect failed."+
GetDbgInfo();
161 stringerr_message =
"Some other query is executing on this connection."+
169 stringerr_message =
"The statement handler is invalid (memory corruption suspected)."+
179 stringerr_message =
"Unexpected error."+
GetDbgInfo();
214 enum{eNameStrLen = 64};
223 stringerr_message =
"A command has to be sent first."+
GetDbgInfo();
237 "SQLNumResultCols failed", 420011);
243 "SQLRowCount failed", 420013);
260 "SQLColAttribute failed", 420015);
326q_exec +=
n?
',':
' ';
330sprintf(p_nm,
"@pR%d",
n);
341q_exec += name+
'='+name;
342 cmd+=
"declare "+ name +
' '+
type+
";select "+ name +
" = ?;";
350q_exec +=
" output";
351 const char* p_name = param_named? name.c_str() : p_nm;
352 if(!q_select.empty()) q_select +=
',';
353q_select.append(p_name+1);
376 stringerr_message =
"SQLMoreResults failed."+
GetDbgInfo();
381 stringerr_message =
"SQLMoreResults failed (memory corruption suspected)."+
Convenience extension of basic_string, supporting implicit conversion to const TChar* in most situati...
void * Alloc(size_t nof_bytes)
virtual bool HasMoreResults(void) const
unique_ptr< CDBParams > m_InParams
virtual bool Send(void)
Send command to the server.
virtual bool Cancel(void)
Cancel the command execution.
virtual int RowCount(void) const
Get the number of rows affected by the command Special case: negative on error or if there is no way ...
virtual ~CODBC_RPCCmd(void)
bool x_AssignParams(string &cmd, string &q_exec, string &q_select, CMemPot &bind_guard, SQLLEN *indicator)
bool xCheck4MoreResults(void)
CODBC_RPCCmd(CODBC_Connection &conn, const string &proc_name)
virtual CDB_Result * Result(void)
Get result set.
virtual CDBParams & GetBindParams(void)
Binding.
const CODBC_Connection::TDbgInfo & GetDbgInfo(void) const
bool x_BindParam_ODBC(const CDB_Object ¶m, CMemPot &bind_guard, SQLLEN *indicator_base, unsigned int pos) const
string Type2String(const CDB_Object ¶m) const
SQLHSTMT GetHandle(void) const
int CheckSIE(int rc, const char *msg, unsigned int msg_num) const
bool ResetParams(void) const
EEncoding GetClientEncoding(void) const
void SetDbgInfo(const string &msg)
CODBC_Connection & GetConnection(void)
void ReportErrors(void) const
const string & GetQuery(void) const
virtual void SetHasFailed(bool flag=true)
const CDB_Params & GetBindParamsImpl(void) const
void DetachInterface(void)
bool NeedToRecompile(void) const
void SetWasSent(bool flag=true)
impl::CConnection & GetConnImpl(void) const
static CDB_Result * Create_Result(CResult &result)
void DropCmd(impl::CCommand &cmd)
CDB_Object * GetParam(unsigned int param_no) const
const string & GetParamName(unsigned int param_no) const
TStatus GetParamStatus(unsigned int param_no) const
unsigned int NofParams() const
static CS_CONNECTION * conn
#define DATABASE_DRIVER_ERROR(message, err_code)
#define NCBI_CURRENT_FUNCTION
Get current function name.
#define NCBI_CATCH_ALL_X(err_subcode, message)
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
Definition of all error codes used in dbapi libraries (dbapi_driver.lib and others).
int strcmp(const char *str1, const char *str2)
TSqlString x_MakeTSqlString(const CTempString &s, EEncoding enc)
static SLJIT_INLINE sljit_ins l(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)
#define SQL_STILL_EXECUTING
SQLRETURN SQLRowCount(SQLHSTMT StatementHandle, SQLINTEGER *RowCount)
SQLRETURN SQLExecDirect(SQLHSTMT StatementHandle, SQLCHAR *StatementText, SQLINTEGER TextLength)
#define SQL_INVALID_HANDLE
#define SQL_SUCCESS_WITH_INFO
SQLRETURN SQLNumResultCols(SQLHSTMT StatementHandle, SQLSMALLINT *ColumnCount)
SQLRETURN SQLColAttribute(SQLHSTMT StatementHandle, SQLUSMALLINT ColumnNumber, SQLUSMALLINT FieldIdentifier, SQLPOINTER CharacterAttribute, SQLSMALLINT BufferLength, SQLSMALLINT *StringLength, SQLINTEGER *NumericAttribute)
SQLRETURN SQLMoreResults(SQLHSTMT hstmt)
signed short int SQLSMALLINT
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