

| T_s on PHP | |
| erdened on Basic | |
| nsfuture on Web Development ASP.NET … | |
| Tsatsaa on J2ME | |
| Tsatsaa on My SQL | |
| hhh on C# | |
| duurii on Object-Oriented programmi… | |
| bokhoo on Web Development ASP.NET … | |
| boloroo on Web Development ASP.NET … | |
| dugee on Microsoft SQL |
|
Blog at WordPress.com. | Theme: Ocean Mist by Ed Merritt
Шинээр
By: bokhoo on March 28, 2008
at 5:13 am
C# дээр Oracle – ын StoredProcedure ажиллуулах…
public void Execute(string ConnStr, string Query)
{
OracleConnection conn = null;
OracleCommand cmd = null;
try
{
conn = new OracleConnection(ConnStr);
conn.Open();
if (conn.State.ToString().Equals(“Open”))
{
cmd = new OracleCommand(Query, conn);
cmd.CommandType = CommandType.StoredProcedure;
cmd.ExecuteNonQuery();
conn.Close();
}
}
catch (Exception ex)
{
throw ex;
}
finally
{
cmd = null;
conn = null;
}
}
By: bokhoo on April 15, 2008
at 12:50 am
hi
By: same on April 30, 2008
at 10:32 am
hi
By: bokhoo on May 2, 2008
at 2:24 am
hi, php code-r oracle ruu yaj holbogdoh ve?
code-g ni tavij uguuch
By: channa on June 19, 2008
at 5:59 pm
за удахгүй тавина аа. удсанд уучлаарай
By: bokhoo on June 23, 2008
at 11:59 am
(string) Connect to the database as this username.
* password => (string) Password associated with the username.
* database => Either the name of the local Oracle instance, or the
* name of the entry in tnsnames.ora to which you want to connect.
*
* @todo fix inconsistency between “database” used here and “dbname” use elsewhere
* @var array
*/
protected $_config = array(
‘dbname’ => null,
‘username’ => null,
‘password’ => null,
);
protected $_execute_mode = OCI_COMMIT_ON_SUCCESS;
/**
* Constructor.
*
* $config is an array of key/value pairs containing configuration
* options. These options are common to most adapters:
*
* username => (string) Connect to the database as this username.
* password => (string) Password associated with the username.
* database => Either the name of the local Oracle instance, or the
* name of the entry in tnsnames.ora to which you want to connect.
*
* @param array $config An array of configuration keys.
*/
public function __construct($config)
{
// make sure the config array exists
if (! is_array($config)) {
throw new Zend_Db_Adapter_Exception(‘must pass a config array’);
}
// we need at least a dbname
if (! array_key_exists(‘password’, $config) || ! array_key_exists(‘username’, $config)) {
throw new Zend_Db_Adapter_Exception(‘config array must have at least a username and a password’);
}
// @todo Let this protect backward-compatibility for one release, then remove
if (array_key_exists(‘database’, $config) || ! array_key_exists(‘dbname’, $config)) {
$config['dbname'] = $config['database'];
unset($config['database']);
trigger_error(“Deprecated config key ‘database’, use ‘dbname’ instead.”, E_USER_NOTICE);
}
// keep the config
$this->_config = array_merge($this->_config, (array) $config);
// create a profiler object
$enabled = false;
if (array_key_exists(‘profiler’, $this->_config)) {
$enabled = (bool) $this->_config['profiler'];
unset($this->_config['profiler']);
}
$this->_profiler = new Zend_Db_Profiler($enabled);
}
/**
* Creates a connection resource.
*
* @return void
*/
protected function _connect()
{
/**
* @todo should check resource here
*/
if ($this->_connection) {
return;
}
if (isset($this->_config['dbname'])) {
$this->_connection = oci_connect($this->_config['username'], $this->_config['password'], $this->_config['dbname']);
} else {
$this->_connection = oci_connect($this->_config['username'], $this->_config['password']);
}
// check the connection
if (!$this->_connection) {
throw new Zend_Db_Adapter_Oracle_Exception(oci_error());
}
}
/**
* Returns an SQL statement for preparation.
*
* @param string $sql The SQL statement with placeholders.
* @return Zend_Db_Statement_Oracle
*/
public function prepare($sql)
{
$this->_connect();
$stmt = new Zend_Db_Statement_Oracle($this, $sql);
$stmt->setFetchMode($this->_fetchMode);
return $stmt;
}
/**
* Gets the last inserted ID.
*
* @param string $tableName name of table associated with sequence
* @param string $primaryKey not used in this adapter
* @return integer
*/
public function lastInsertId($tableName = null, $primaryKey = null)
{
if (!$tableName) {
throw new Zend_Db_Adapter_Exception(“Sequence name must be specified”);
}
$this->_connect();
$data = $this->fetchCol(“SELECT $tableName.currval FROM dual”);
return $data[0]; //we can’t fail here, right? if the sequence doesn’t exist we should fail earlier.
}
/**
* Returns a list of the tables in the database.
*
* @return array
*/
public function listTables()
{
$this->_connect();
$data = $stmt->fetchCol(‘SELECT table_name FROM all_tables’);
return $data;
}
/**
* Returns the column descriptions for a table.
*
* @return array
*/
public function describeTable($table)
{
$table = strtoupper($table);
$sql = “SELECT column_name, data_type, data_length, nullable, data_default from all_tab_columns WHERE table_name=’$table’ ORDER BY column_name”;
$result = $this->query($sql);
while ($val = $result->fetch()) {
$descr[$val['column_name']] = array(
‘name’ => $val['column_name'],
‘notnull’ => (bool)($val['nullable'] === ‘N’), // nullable is N when mandatory
‘type’ => $val['data_type'],
‘default’ => $val['data_default'],
‘length’ => $val['data_length']
);
}
return $descr;
}
/**
* Leave autocommit mode and begin a transaction.
*
* @return void
*/
protected function _beginTransaction()
{
$this->_setExecuteMode(OCI_DEFAULT);
}
/**
* Commit a transaction and return to autocommit mode.
*
*/
protected function _commit()
{
if (!oci_commit($this->_connection)) {
throw new Zend_Db_Adapter_Oracle_Exception(oci_error($this->_connection));
}
$this->_setExecuteMode(OCI_COMMIT_ON_SUCCESS);
}
/**
* Roll back a transaction and return to autocommit mode.
*
* @return void
*/
protected function _rollBack()
{
if (!oci_rollback($this->_connection)) {
throw new Zend_Db_Adapter_Oracle_Exception(oci_error($this->_connection));
}
$this->_setExecuteMode(OCI_COMMIT_ON_SUCCESS);
}
/**
* Set the fetch mode.
*
* @param int $mode A fetch mode.
* @return void
* @todo Support FETCH_CLASS and FETCH_INTO.
*/
public function setFetchMode($mode)
{
switch ($mode) {
case Zend_Db::FETCH_NUM: // seq array
case Zend_Db::FETCH_ASSOC: // assoc array
case Zend_Db::FETCH_BOTH: // seq+assoc array
case Zend_Db::FETCH_OBJ: // object
$this->_fetchMode = $mode;
break;
default:
throw new Zend_Db_Adapter_Exception(‘Invalid fetch mode specified’);
break;
}
}
/**
* Quote a raw string.
*
* @param string $value Raw string
* @return string Quoted string
*/
protected function _quote($value)
{
//@todo should we throw an exception here?
return $value;
}
/**
* Quotes an identifier.
*
* @param string $ident The identifier.
* @return string The quoted identifier.
*/
public function quoteIdentifier($ident)
{
//@todo should we throw an exception here?
return $ident;
}
/**
* Adds an adapter-specific LIMIT clause to the SELECT statement.
*
* @return string
*/
public function limit($sql, $count, $offset)
{
/*
Oracle doesn’t have a LIMIT statement implementation, so we have to “emulate” it using rnum
*/
$limit_sql = “SELECT
zsubselect2.*
FROM
(
SELECT
rownum zrownum,
zsubselect1.*
FROM
(
“.$sql.”
)
zsubselect1
)
zsubselect2
WHERE
zrownum BETWEEN “.$offset.” AND “.($offset+$count).”
“;
return $limit_sql;
}
private function _setExecuteMode($mode) {
switch($mode) {
case OCI_COMMIT_ON_SUCCESS:
case OCI_DEFAULT:
case OCI_DESCRIBE_ONLY:
$this->_execute_mode = $mode;
break;
default:
throw new Zend_Db_Adapter_Exception(‘wrong execution mode specified’);
break;
}
}
public function _getExecuteMode() {
return $this->_execute_mode;
}
}
By: bokhoo on June 23, 2008
at 12:12 pm
зөвлөхөд: http://www.google.com/codesearch
By: bokhoo on June 23, 2008
at 12:13 pm
Ингэхэд Oralce гээд биччихжээ
By: Мөнхбат on February 10, 2009
at 6:26 pm
get post 2-iin yalgaa n yu yum bol oo.
tegeed bas fetch array -iin talaar delgerengui medeelel baiwal olj ugch tusaach.
By: doogii on May 6, 2009
at 10:50 am
oracle ali hir hemjeetei bdg ve. cd-nd bagtah uu
By: galsaa on June 23, 2009
at 5:13 pm
DVD – д багтах байх. 3+ GB байдаг
By: bokhoo on June 23, 2009
at 5:52 pm
oracle-iig haanaas oloh ve
By: galsaa on June 26, 2009
at 12:00 am
http://www.oracle.com татаж авах чөлөөтэй. бас юм аа хийхэд ч чөлөөтэй. гэвч чи өөрийн хийсэн зүйлээрээ ашиг олох тэр үед лиценз авахгүй бол асуудалд орно хэхэ
By: bokhoo on June 26, 2009
at 9:04 am
Oracle Database Software-iig ni tataj avahad boloh u
By: galsaa on June 26, 2009
at 4:21 pm
болно оо
By: bokhoo on June 26, 2009
at 4:36 pm
hi.medlegeesee huvaaltsaj baigaad chamd mash ih bayarlalaa.Oracle deer baigaa data gaa mysql ruu horvuuleh gesen yum.delphi deer boloh uu? bolvol yaaj boloh ve? bolohgui bol visual basice deer yaaj bichih be please? tuslaach
By: Zaya on July 20, 2009
at 3:05 pm
шууд database хооронд бол сайн мэдэхгүй юм аа Tool байж магадгүй. Дунд нь жижиг програм бичээд уншаад бичиж болно. маш амархан. Жишээ нь: хамгийн энгийнээр нэг Grid тавиад дүүн дэрээ дата-гаа уншаад нөгөө бааз руугаа бичиж болно…
By: bokhoo on July 20, 2009
at 4:50 pm
hi.medlegeesee huwaaltsaj bgad bayarlalaa.oracle 9i her bol.suulgah geed tataj awch bna.barag l 1 odor boloh yum shig bna.oracle deer yaj database uusgedeg yum be.help me.jijig hemjeenii baaz uusgeh gesen yum.yaraltai hariu uguurei.
By: Soko on August 17, 2009
at 8:21 pm
Oracle сууж байхдаа датабэйс ээ суулгах уу гэж асуудаг. Default – аар нь явуулбал нэг бааз суучихна. Дараа нь суулгаж бас болно. Өөрт нь бэлэн Tool байгаа. Ер нь бага хэмжээний database – д oracle тохиромжгүй санагдсан. mssql – ээс ялгаатай нэг тал нь 1 ширхэг Database үүсгэхэд л санах ой, диск гээд л маш том зай эзэлдэг. сервер биш жирийн бидний pc дээр бол 1 – ээс их бааз бол дийлэхгүй юм шиг надад санагдсан….
By: bokhoo on August 18, 2009
at 9:19 am
яаж бааз үүсгэх вэ гэдэг ээ өөрөө үзчих амархан. суулгаж дууссаны дараа all programs – д чинь ORA-*** иймэрхүү нэртэй файл үүссэн байнаа. Тэндээс уншиж байгаад л Database гэсэн рүү нь ороод явчихна. Харин бүүр эхнээсээ суулгахдаа Client, Server суулгахаа сонгодог юм шүү…
By: bokhoo on August 18, 2009
at 9:33 am
Thanks.suulgah gesen zai hureltsehgui bna geed bhaar ni zarim yumaa ustgaj bna.yamar ch baisan suulgaad neg baaz uusgej uzeh gesen yumaa.
By: Soko on August 19, 2009
at 4:22 pm
амжилт
By: bokhoo on August 19, 2009
at 6:53 pm
Suulgachihsan.Toad-iig ni ch bas suulgachihlaa.yamar goy we.heden odor zuuraldwaa.baasaa uusgechihlee.ogogdloo yaj oruuldag bilee.
By: Soko on August 20, 2009
at 7:01 pm
Ura. Suulgachihsan.Toad-iig ni ch bas suulgachihlaa.yamar goy we.heden odor zuuraldwaa.baasaa uusgechihlee.ogogdloo yaj oruuldag bilee.
By: Soko on August 20, 2009
at 7:02 pm
PLSQL гэж судлана даа одоо…
By: bokhoo on August 20, 2009
at 9:15 pm
hi.PLSQL ene yu yum.yund heregtei bdag yum
By: Soko on August 21, 2009
at 4:37 pm
PL
By: Soko on August 21, 2009
at 4:43 pm
Яахав дээ oracle – ийн дэмждэг sql байхгүй юу. insert delete update procedure ect .. бичнэ ш дээ одоо суулгацан хүн чинь…
By: bokhoo on August 21, 2009
at 5:33 pm
ok.medeelel ogch baigaad thanks.baazaa uusgeed mongoloor bichih gesen chini baahan үүүүүү bolchih yum.tohirgoog ni yaj oorchloh we.
By: Soko on August 21, 2009
at 8:53 pm
бааз шинээр үүсгэж байхдаа UTF-8 гэж зааж өгдөг юм.
By: bokhoo on August 22, 2009
at 12:25 pm
toad 9.0 oos deesh mongol font tanidag gesen tegeed suulgah geed l bj bn.
By: Soko on August 22, 2009
at 2:52 pm
TOAD International гэж бий … гэхдээ заавал бааз дээрээ тохиргоо хийнэ бас …
HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\HOME0\NLS_LANG – регистерийн
AMERICAN_AMERICA.AL32UTF8 утга байх ёстой …
By: bokhoo on August 22, 2009
at 3:46 pm
ok.utgaa olgochihson.
By: Soko on August 22, 2009
at 4:45 pm
ok
By: bokhoo on August 24, 2009
at 10:22 am