PS:  Boris read your code more closely than I did, and saw what was really 
going on.

FWIW & IMHO it seems like a really bad idea to create a method that mimics 
an ND method except that it begins with an uppercase letter instead of the 
java standard lowercase letter.  Makes your code hard to understand by 
anybody but you.

-- Curt Springer, Team ND

When you execute a method without an object qualifer (e.g. 
someobject.someMethod()) or a class qualifier (e.g. SomeClass.someMethod), 
it is assumed to be a method of the class that is executing the method (or 
of one of its ancestors).

The error message is telling you that 'executeImmediate' is not a method 
found on your page class or on any of its ancestors, including those that 
are ND classes.

If you were to look up 'executeImmediate' in the ND javadoc, you would find 
that it is a static method on CSpDataObject.  Thus you must qualify it as 
CSpDataObject.executeImmediate(.....).

Curt Springer, Team ND
(2 in a row, this must be Canada Day)


At 01:19 PM 10/7/99 -0600, Kaluza, Isabel SLGA wrote:
>Hi
>I have a java file called LionPage.java that contains the following method.
>public static CSpDBResult ExecuteImmediate(String  dataSourceName,String
>SqlString)
>{
>     CSpDBResult     results = null;
>     int maxNumRows = 50;
>     try
>     {
>
>                 CSpDBExecuteControl execute =
>         new CSpDBExecuteControl(true, true,
>                 CSpDBExecuteControl.MEMORY_TABLE_FETCH_METHOD,
>         0, maxNumRows, CSpDBExecuteControl.FROM_TABLE_BEGINNING,
>                 CSpDBExecuteControl.ORDERED_FORWARD );
>                 CSpDBConnection  conn = new
>                 CSpDBConnection(CSpider.getDataSource("dsLionUser "));
>                 CSpDBSQLRequest request = new CSpDBSQLRequest(conn, new
>                 CSpDBTransactionControl(),execute, SqlString);
>
>         }
>         catch (Exception        ex)
>         {
>             results = null;
>             // Exception messages
>         }
>
>         return (results);
>     }
>
>I have a page pgReport14 that extends LionPage
>which the following line of code
>String sqlquery = "Select a from b"
>CSpDBResult results = ExecuteImmediate("dsLionUser", sqlquery);
>
>WHEN I COMPILE pgReport14 I get the following error
>  Method ExecuteImmediate(java.lang.String, java.lang.String) not found in
>class Lion.pgReport14sp.
>                         CSpDBResult results = ExecuteImmediate("dsLionUser",
>sqlquery);
>WHAT AM I DOING WRONG?
>
>I am doing the above cause have alot of different pages that use
>executeimmediate.  I am using Sybase and want to default the fetch method to
>memory table fetch method.  I wanted to put the code in one place and
>everytime executeimmediate is needed just call the method.
>Isabel Kaluza
>Junior System Planning Analyst
>Saskatchewan Liquor and Gaming Authority
>[EMAIL PROTECTED]
>
>_________________________________________________________________________
>
>For help in using, subscribing, and unsubscribing to the discussion
>forums, please go to: http://www.netdynamics.com/support/visitdevfor.html
>
>For dire need help, email: [EMAIL PROTECTED]

_________________________________________________________________________

For help in using, subscribing, and unsubscribing to the discussion
forums, please go to: http://www.netdynamics.com/support/visitdevfor.html

For dire need help, email: [EMAIL PROTECTED]

Reply via email to