3

щ-Yj@s4ddlZddlZddlZdejd<GdddZdS)Nz'/u01/app/oracle/product/12.2.0/dbhome_1ZORACLE_HOMEc@seZdZdddZddZdS)DBiomysqlcCs||_||_||_||_dS)N)userpswddbtype)selfrrrrr	5/home/s/sultans/web/python/demo/oo/zAnalytics/DBio.py__init__sz
DBio.__init__cCsg}|jjdkrd}d}|j}|j}|j}yPtj||||d}|j}	|	j||	j	}
x|
dk	rx|j
|
|	j	}
q\WWnVtjk
r}z8|jd}|jd}
dt
||
}t|tWYdd}~XnX|	j|j|jjdkrd}d	}|j}|j}|j}|d
|d|d|d
|}yLtj|}|j}	|	j||	j	}
x"|
dk	rz|j
|
|	j	}
qZWWn@tjk
r}z dt
|}t|tWYdd}~XnX|	j|j|S)
NrZ	localhostZ3306)hostrrZpasswordrzDatabase Error - ZoracleZ1521/@:)rlowerrrrmydbZconnectcursorZexecuteZfetchoneappendErrorargsstrprintexitcloseoradbZ
DatabaseError)rsqlZDBresultrZportrrrZconnrroweZerrorNumZerrorMsgerrorZconnect_strr	r	r
execSQLsZ




$


zDBio.execSQLN)r)__name__
__module____qualname__rr r	r	r	r
r
s
	r)osZpymysqlrZ	cx_Oraclerenvironrr	r	r	r
<module>s