Stored Procedure Problem (OpenInsight Specific)
At 22 NOV 1998 12:45:22PM Richard Richter wrote:
I am trying to create a stored procedure that will select all the records in a table and trim the spaces from the beginning and end of the data. The data was imported from REVG and somehow picked up spaces at the beginning and end of multivalued fields. The procedure I wrote does not seem to run at all since there is no disk read when you execute the executable. I sure would appreciate any help anyone could give.
Compile Subroutine REV_IMPORT_UPDATE(CharStr Done)
Begin Condition
Pre:
Post:
End Condition
$Insert Logical
Done=FALSE$
Open "VCR" To FRIU Then
Select FRIULoopReadnext Key ThenRead Tape From FRIU,Key ThenStart=TapeFinish=TapeName=TapeType=TapeLength=TapeSpeed=TapeSt=Count(Start,@VM)+1For X=1 to StStart=TrimB(Start)Start=TrimF(Start)Next XFn=Count(Finish,@VM)+1For X=1 to FnFinish=TrimB(Finish)Finish=TrimF(Finish)Next XNm=Count(Name,@VM)+1For X=1 to NmName=TrimB(Name)Name=TrimF(Name)Next XTy=Count(Type,@VM)+1For X=1 to TyType=TrimB(Type)Type=TrimF(Type)Next XLn=Count(Length,@VM)+1For X=1 to LnLength=TrimB(Length)Length=TrimF(Length)Next XSp=Count(Speed,@VM)+1For X=1 to SpSpeed=TrimB(Speed)Speed=TrimF(Speed)Next XTape=StartTape=FinishTape=NameTape=TypeTape=LengthTape=SpeedWrite Tape To FRIU,Key Else NullEndEnd Else Done=TRUE$Until Done RepeatEnd
At 23 NOV 1998 09:36AM Dave Pociu wrote:
Richard,
I'd like to help, but you have to make me understand what you mean by:
"The procedure I wrote does not seem to run at all since there is no disk read when you execute the executable" .
Can you not attach the table?
If you can attach the table, can you not read records from the table?
If you can read, can you not write back to the table?
Etc.
Thanks
Dave
At 23 NOV 1998 10:47AM Richard Richter wrote:
Using the System Editor, I can attach the table and read the records. When I run the Stored Procedure, nothing happens. If I insert a debug command in the procedure, it does not bring up the debugger.
At 23 NOV 1998 11:10AM Oystein Reigem wrote:
Richard,
Cannot see anything wrong with the programming except I wonder why you have Done as a subroutine parameter. Surely Done must be a local variable.
- Oystein -
At 23 NOV 1998 11:34AM amcauley@sprezzatura.com onmouseover=window.status=why not click here to send me email?;return(true)", [url=http://www.sprezzatura.com" onMouseOver=window.status=Why not click here to visit our web site?';return(true)]Sprezzatura Ltd[/url] wrote:
There was an intermittent problem in 3.61 that the debugger would not be invoked until you had manualy invoked it. Could this be the problem here?
amcauley@sprezzatura.com
World Leaders in all things RevSoft
At 23 NOV 1998 11:48AM Richard Richter wrote:
I'm using OIS 3.7.
At 23 NOV 1998 11:50AM Richard Richter wrote:
It wouldn't compile without an argument so I invented one.
At 23 NOV 1998 12:32PM Nick Stevenson wrote:
Some silly ideas:
Always use CLEARSELECT before doing a SELECT. If you terminated a READNEXT before reading all the keys on a prior run, you may get unpredictable results on a subsequent SELECT.
I remember in the early days of OI trying to use a table which started with the letters 'SYS'. No matter what I tried, I could not get data in or out of the table. The table builder happily created the table for me - but that was the end of it. It eventually hit me that the prefix 'SYS' was reserved for SYStem tables. The point I'm trying to make is that a SP prefixed with 'REV' may suffer from the same problem. Try renaming your proc to something else.
Good luck.
At 23 NOV 1998 10:42PM Dave Pociu wrote:
Richard,
Let me get this straight:
If you put a debug statement in at the beginning, the debugger never kicks in, right?
Is it just this subroutine, or any subroutine in your system?
At 24 NOV 1998 09:42AM Richard Richter wrote:
It seems to be all stored procedures.
At 24 NOV 1998 11:14AM Cameron Revelation wrote:
Richard,
It sounds like you need to enable the debugger. Open it by using the Tools-Advanced menu in OpenInsight. Choose enable from the Debugger's File menu.
Cameron Purdy
Revelation Software
At 24 NOV 1998 12:37PM Richard Richter wrote:
I know I'm not the shiniest penny in the pile but I don't see the enable choice in the debugger's file menu.
At 24 NOV 1998 01:43PM Cameron Revelation wrote:
Richard,
If the debugger were disabled, it would look like:
Cameron Purdy
Revelation Software
At 24 NOV 1998 02:12PM Richard Richter wrote:
The File menu has four open commands and exit.
At 24 NOV 1998 05:13PM Cameron Revelation wrote:
Richard,
That sounds like it is not disabled. If you type "run debug" and press enter from the System Editor command line, what happens?
Cameron Purdy
Revelation Software
At 24 NOV 1998 05:17PM Richard Richter wrote:
The debugger opens normally.
At 25 NOV 1998 09:05AM Cameron Revelation wrote:
Richard,
The DEBUG SPP has one line of code which says "debug". Since you ran it and it opened the debugger, your original assumption is incorrect (that no stored procedures with a debug statement invoke the debugger).
I cannot determine from your posts any information that would help me track the problem down. For the stored procedure which does not go to the debugger, what is the name of the stored procedure? If you put a debug statement after the subroutine/function declaration and compile/run it, what happens? Have you tried to delete the $ record in SYSOBJ for that procedure and then re-compiled it to verify that it is being compiled?
Cameron Purdy
Revelation Software
At 25 NOV 1998 04:14PM Richard Richter wrote:
When I run the SPP from the application manager/openinsight executables/stored procedure executables nothing seems to be happening. In order to check if it was running at all, I added a debug statement to the SPP and again nothing happened. I deleted the $ record in SYSOBJ and recompiled and got the same results.
FYI, I am using OIS 3.7 with Win98 as a single user. I have also tried it at my office using OIS 3.7 with WinNT4/SP3.
I'm really stumped. I really appreciate your help.
At 25 NOV 1998 04:33PM amcauley@sprezzatura.com onmouseover=window.status=why not click here to send me email?;return(true)", [url=http://www.sprezzatura.com" onMouseOver=window.status=Why not click here to visit our web site?';return(true)]Sprezzatura Ltd[/url] wrote:
and if you go to the system monitor and type RUN MYPROG what happens?
amcauley@sprezzatura.com
World Leaders in all things RevSoft
At 27 NOV 1998 10:00AM Richard Richter wrote:
I get the following error message:
ENG0010: $!, line 1. Variable has not been assigned a value.
At 11 DEC 1998 12:38PM apk@sprezzatura.com - [url=http://www.sprezzatura.com]Sprezzatura, Inc.[/url] wrote:
Hmmm….If it's ! breaking, this means there something wrong with an index somewhere. How does this affect itself on a stored procedure with a simple debug? Did you place an index on SYSPROCS or something?
apk@sprezzatura.com