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]