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
 
For 2023 (and 2024 ...) - we are now fully retired from IT training.
We have made many, many friends over 25 years of teaching about Python, Tcl, Perl, PHP, Lua, Java, C and C++ - and MySQL, Linux and Solaris/SunOS too. Our training notes are now very much out of date, but due to upward compatability most of our examples remain operational and even relevant ad you are welcome to make us if them "as seen" and at your own risk.

Lisa and I (Graham) now live in what was our training centre in Melksham - happy to meet with former delegates here - but do check ahead before coming round. We are far from inactive - rather, enjoying the times that we are retired but still healthy enough in mind and body to be active!

I am also active in many other area and still look after a lot of web sites - you can find an index ((here))
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., 2024: Well House Manor • 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01144 1225 708225 • FAX: 01144 1225 793803 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho