mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 14:16:07 -06:00
Oracle: Fixed warnings
git-svn-id: svn://ultimatepp.org/upp/trunk@15137 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
6e889326ee
commit
def0dbda01
2 changed files with 6 additions and 6 deletions
|
|
@ -1198,7 +1198,7 @@ void OCI8Connection::Clear() {
|
|||
static char close[] = "begin close :1; end;";
|
||||
bool err = false;
|
||||
OCIBind *bind = 0;
|
||||
err = oci8.OCIStmtPrepare(aux, errhp, (OraText *)close, strlen(close), OCI_NTV_SYNTAX, OCI_DEFAULT)
|
||||
err = oci8.OCIStmtPrepare(aux, errhp, (OraText *)close, (ub4)strlen(close), OCI_NTV_SYNTAX, OCI_DEFAULT)
|
||||
|| oci8.OCIBindByPos(aux, &bind, errhp, 1, &stmthp, 0, SQLT_RSET, 0, 0, 0, 0, 0, OCI_DEFAULT)
|
||||
|| oci8.OCIStmtExecute(SvcCtx(), aux, errhp, 1, 0, 0, 0, OCI_DEFAULT);
|
||||
if(err)
|
||||
|
|
@ -1312,7 +1312,7 @@ bool Oracle8::Login(const char *name, const char *pwd, const char *db, bool use_
|
|||
return false;
|
||||
}
|
||||
LLOG("Attributes allocated -> OCIServerAttach");
|
||||
if(oci8.OCIServerAttach(srvhp, errhp, (byte *)db, strlen(db), 0)) {
|
||||
if(oci8.OCIServerAttach(srvhp, errhp, (byte *)db, (sb4)strlen(db), 0)) {
|
||||
SetOciError(NFormat(t_("Connecting to server '%s'"), db), errhp);
|
||||
Logoff();
|
||||
return false;
|
||||
|
|
@ -1321,8 +1321,8 @@ bool Oracle8::Login(const char *name, const char *pwd, const char *db, bool use_
|
|||
in_server = true;
|
||||
sword retcode;
|
||||
if(oci8.OCIAttrSet(svchp, OCI_HTYPE_SVCCTX, srvhp, 0, OCI_ATTR_SERVER, errhp)
|
||||
|| oci8.OCIAttrSet(seshp, OCI_HTYPE_SESSION, (byte *)name, strlen(name), OCI_ATTR_USERNAME, errhp)
|
||||
|| oci8.OCIAttrSet(seshp, OCI_HTYPE_SESSION, (byte *)pwd, strlen(pwd), OCI_ATTR_PASSWORD, errhp)
|
||||
|| oci8.OCIAttrSet(seshp, OCI_HTYPE_SESSION, (byte *)name, (ub4)strlen(name), OCI_ATTR_USERNAME, errhp)
|
||||
|| oci8.OCIAttrSet(seshp, OCI_HTYPE_SESSION, (byte *)pwd, (ub4)strlen(pwd), OCI_ATTR_PASSWORD, errhp)
|
||||
|| oci8.OCIAttrSet(svchp, OCI_HTYPE_SVCCTX, seshp, 0, OCI_ATTR_SESSION, errhp)
|
||||
|| (retcode = oci8.OCISessionBegin(svchp, errhp, seshp, OCI_CRED_RDBMS, OCI_DEFAULT)) != OCI_SUCCESS
|
||||
&& retcode != OCI_SUCCESS_WITH_INFO) {
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ const char *OciParseString(const char *s) {
|
|||
|
||||
String OciParseStringError(const char *s) {
|
||||
String err = "Parse error: unterminated string ";
|
||||
int l = strlen(s);
|
||||
int l = (int)strlen(s);
|
||||
enum { SAMPLE = 10 };
|
||||
if(l <= SAMPLE)
|
||||
err.Cat(s, l);
|
||||
|
|
@ -96,7 +96,7 @@ int OciParse(const char *statement, String& out, OciSqlConnection *conn, SqlSess
|
|||
session -> SetError(OciParseStringError(b), statement);
|
||||
return -1;
|
||||
}
|
||||
cmd.Cat(b, s - b);
|
||||
cmd.Cat(b, int(s - b));
|
||||
}
|
||||
else if(*s == '?') {
|
||||
++s;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue