Training, Open Source computer languages
PerlPHPPythonMySQLApache / TomcatTclRubyJavaC and C++LinuxCSS 
Search for:
Home Accessibility Courses Diary The Mouth Forum Resources Site Map About Us Contact
 
This week, we're updating our course layouts and descriptions. Presentation and materials always gently change over time, but just occasionally there's a need to make a step change to clear out some of the old and roll in the new. That's now happening - but over a long and complex site it's not instant and you'll see sections of the site changing up to and including 19th September.

See also [here] for status update
 
Resource Id Error

Posted by pagalreddy (pagalreddy), 10 October 2005
$loOK = false;
//------------------------
     $GOrgID = $_POST['OrgID'];
     if (isset($_POST['password']))
     {
     $EnteredPassword = $_POST['password'];
     }
//..............      
     $testallowval = 'AllowBlankPassword';
     print("testallowval =".$testallowval);
     $curs = ocinewcursor($link);
     $reqQuery = OCIParse($link ,"BEGIN PKG_CMT_PROCS.GetOrgDetail(:GOrgID,:testallowval,:po_refcur);END;");
     print("reqQuery =".$reqQuery);
     OCIbindByName($reqQuery, ":GOrgID", $orgid,1);
     OCIbindByName($reqQuery, ":testallowval", &$detailname,32);
     OCIbindByName($reqQuery, ":po_refcur", &$curs, -1, OCI_B_CURSOR);
 ociexecute($reqQuery);
     Ociexecute($curs);            
     
ocifetch($curs);
           
     $stPasswordNotRequired = ociresult($curs, 'DetailValue'); //'true' or 'false'
     $_SESSION['GAllowBlankPassword'] = $stPasswordNotRequired;
     print("curs =".$curs);
     print("stPasswordNotRequired = ".$stPasswordNotRequired);
     
     
     ocifreestatement($reqQuery);
     ocifreecursor($curs);



WHen I try to print, It keeps giving me Resource Id error.





Posted by curtis (curtis), 11 October 2005
You have a lot of custom code references there, so it's hard to pin point the problem exactly. Also, what line is the error on? Give us about 10 lines above and below that line.

Posted by pagalreddy (pagalreddy), 11 October 2005
$GOrgID = $_POST['OrgID'];
 echo $_POST[&#8216;OrgID&#8217;]."<BR>";   Line 184
     echo $GOrgID;
 if (isset($_POST['password']))
 {
  $EnteredPassword = $_POST['password'];
      }
 $reqQuery = OCIParse($link ,"BEGIN PKG_CMT_PROCS.GetOrgDetail(:GOrgID,:AllowBlankPassword,:po_refcur);END;");
 print("GOrgID =".$GOrgID);
 OCIbindByName($reqQuery, ":GOrgID", &$orgid,1); //&$orgid is the column name
 OCIbindByName($reqQuery, ":AllowBlankPassword", &$detailname,32); //&$detailname is the column name
 OCIbindByName($reqQuery, ":po_refcur", &$curs, -1, OCI_B_CURSOR); line 194

        ociexecute($reqQuery);  Line 196
        Ociexecute($curs);         Line 197

           ocifetch($curs);              
           $stPasswordNotRequired = ociresult($curs, 'DetailValue'); //'true' or 'false'
           $_SESSION['GAllowBlankPassword'] = $stPasswordNotRequired;

           ocifreestatement($reqQuery);
           ocifreecursor($curs);


Here is the New code   and the errors are

Notice: Use of undefined constant &#8216;OrgID&#8217; - assumed '&#8216;OrgID&#8217;' in D:\inetpub\wwwroot\CMT\index.php on line 184

Notice: Undefined index: &#8216;OrgID&#8217; in D:\inetpub\wwwroot\CMT\index.php on line 184

GOrgID =
Warning: ocibindbyname(): supplied argument is not a valid OCI8-Statement resource in D:\inetpub\wwwroot\CMT\index.php on line 194

Warning: ociexecute(): OCIStmtExecute: ORA-01008: not all variables bound in D:\inetpub\wwwroot\CMT\index.php on line 196

Warning: ociexecute(): supplied argument is not a valid OCI8-Statement resource in D:\inetpub\wwwroot\CMT\index.php on line 197

Warning: ocifetch(): supplied argument is not a valid OCI8-Statement resource in D:\inetpub\wwwroot\CMT\index.php on line 199

Warning: ociresult(): supplied argument is not a valid OCI8-Statement resource in D:\inetpub\wwwroot\CMT\index.php on line 200

Warning: ocifreecursor(): supplied argument is not a valid OCI8-Statement resource in D:\inetpub\wwwroot\CMT\index.php on line 204

I mentioned the Line numbers

Posted by admin (Graham Ellis), 12 October 2005
I'm a MySQL rather than an Oracle person, so this one's a bit outside my speciality. As Curtis has picked up the baton on this one (thanks, Curtis   ) I'll leave it for him or someone else who's into Oracle to comment further on this and on the other bind issues posted.



This page is a thread posted to the opentalk forum at www.opentalk.org.uk and archived here for reference. To jump to the archive index please follow this link.

You can Add a comment or ranking to this page

© WELL HOUSE CONSULTANTS LTD., 2014: Well House Manor • 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01144 1225 708225 • FAX: 01144 1225 899360 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho