Hi kevin!! Check the namespaces, I ran the query in the %CACHELIB namespace and it worked fine but in other namespaces it didn't work.
Warlin Garc�a "kevin furze" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > (watch for line wraps) > > I used the SQL manager from the cube and typed the following in: > > ---------------------------------------------------------------- > select id, Name, LogDate, LogTime, Error, DisplayStarted > from %SYSTEM.TaskHistory > order by LogDate, LogTime > ---------------------------------------------------------------- > > and all works well. - tasks are shown ! > > If I then transport the same query into the CSP using some simple > SCRIPT commands - it fails - I then thought "I will copy it into a > classmethod and call it, - it fails - when I compile it it tells me > that > ---------------------------------------------------------------- > Errors Compiling method/s: ShowHistory > > Utils.Tasks.1(3) : SQL30 : Table `%SYSTEM.TASKHISTORY' not > found > ---------------------------------------------------------------- > > here is my code in the classMethod ShowHistory > > ---------------------------------------------------------------- > set cnt=0,null="" > &sql(DECLARE mCursor CURSOR FOR select id, Name, LogDate, LogTime, > Error, DisplayStarted > into :id, :Name, :LogDate, :LogTime, :Error, :DisplayStarted > from %SYSTEM.TaskHistory > order by LogDate, LogTime) > &sql(OPEN mCursor) > for do Quit:SQLCODE'=0 > . set cnt=cnt+1 > . &sql(FETCH mCursor) quit:SQLCODE > . write "<tr class=",$S(cnt#2:"DarkRow",1:"LightRow"),">",! > . write " <td>",id,"</td>",! > . write " <td>",Name,"</td>",! > . write " <td>",LogDate," ",LogTime,"</td>",! > . write " <td>",Error,"</td>",! > . write " <td>",DisplayStarted,"</td>",! > . write "</tr>",! > &sql(CLOSE mCursor) > ---------------------------------------------------------------- > > > > so naturally, the question is - what's the syntax, how come it works in > the cube but not in CSP or a classmethod. anyone got any ideas.- > > > kev >
