Isabel!
you declared this method as static.
Remove static and compile it again.

Boris

> -----Original Message-----
> From: Kaluza, Isabel SLGA [SMTP:[EMAIL PROTECTED]]
> Sent: Thursday, October 07, 1999 3:20 PM
> To:   'ND'
> Subject:      [ND] Creating Methods in ND 4.0
> 
> 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