php - zend2: Oracle11g: Exception while retrieving columnNames from Metadata class -


iam using zendframework2.5.1 oracle 11g. database connectivity/dml queries executing fine.

need export column names of table present in oracledb. use zend\db\tablegateway\tablegateway db connectivity. learnt using zend\db\metadata\metadata column names retrived. using $tableobject (as shown below), retrieved existing adapter object , table name. no issues here.

$metadataobject = new metadata($tableobject->getadapter()); $tablename = $tableobject->gettable(); 

but when below code executes, exception occurs.

$metadatatable = $metadataobject->gettable($tablename);  

exception

zend\db\adapter\exception\runtimeexception  file: c:\wamp\www\zfc2\vendor\zendframework\zend-db\src\adapter\driver\oci8\statement.php:260 message: ora-01745: invalid host/bind variable name stack trace: #0 c:\wamp\www\zfc2\vendor\zendframework\zend-db\src\metadata\source\oraclemetadata.php(137):    zend\db\adapter\driver\oci8\statement->execute(array) #1 c:\wamp\www\zfc2\vendor\zendframework\zend-db\src\metadata\source\abstractsource.php(316): zend\db\metadata\source\oraclemetadata->loadconstraintdata('css_milibris_us...', 'lnk1db') #2 c:\wamp\www\zfc2\vendor\zendframework\zend-db\src\metadata\source\abstractsource.php(142): zend\db\metadata\source\abstractsource->getconstraints('css_milibris_us...', 'lnk1db') #3 c:\wamp\www\zfc2\vendor\zendframework\zend-db\src\metadata\metadata.php(178): zend\db\metadata\source\abstractsource->gettable('css_milibris_us...', null) #4 c:\wamp\www\zfc2\module\kiosque\src\kiosque\controller\landingcontroller.php(76): zend\db\metadata\metadata->gettable('css_milibris_us...') #5 c:\wamp\www\zfc2\vendor\zendframework\zend-mvc\src\controller\abstractactioncontroller.php(82): 

i referred zenddbmanual link. , tried same. analyzed exception,but couldn't proceed further have analyzed.
observed going through websites is, has accessing restricted variables present in oracle (am not sure it). . in providing solution issue appreciated.

i got solution this. analyzed/browsed/went through logs. found out zend provides metadata class oracle is

use zend\db\metadata\source\oraclemetadata; 

i kindof misthought function retrieve column names of table. correct function retrieve column names of table getcolumnnames

$metadata = new oraclemetadata($tableobject->getadapter()); $mytablename = $tableobject->gettable(); $metadatatable = $metadata->getcolumnnames($mytablename);   

this same logic has work metadata class think. didnt verify it

use zend\db\metadata\metadata 

Comments

Popular posts from this blog

1111. appearing after print sequence - php -

java - WARN : org.springframework.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/board/] in DispatcherServlet with name 'appServlet' -

Ruby on Rails, ActiveRecord, Postgres, UTF-8 and ASCII-8BIT encodings -