Home > Archive > Clipper > January 2006 > Very Confusing Error
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Very Confusing Error
|
|
| forinfinity 2006-01-10, 3:55 am |
| Helllo all. I am using Clipper 5.2, not 5.2 a,b,c,d or e (I'll get to that
later). I have a shared database over a network that opens shared, then
opens a dbedit() to browse the file. My userfunction code is
straightforward, plain vanilla "if then" type stuff. Here's the issue: Any
time editing of the file is execued at runtime, whether the file is used by
another or not, on COMMIT or REPLACE I get an error:
ERROR BASE/1072 ARGUMENT ERROR <>
I have looked that error up everywhere and have gotten nowhere as to what
the hell it actually means. Simply put each of my userfunction sections
consist of this structure:
CASE choice = 68 .OR. choice = 100
IF RLOCK()
(error messages indicating file in use are here)
ELSE
(actions performed when pressing D or d keys)
ENDIF
In a NON-NETWORKED compiling, there are no errors. When I recompile the
code with opening shared and neterror and file / record locking code, I get
this error every time any change is made to the database.
Is this a flaw in 5.2? Do I need to patch to 5.2e?
This is a critical issue I really could use resolved. Thanks to all....
| |
| Stephen Quinn 2006-01-10, 3:55 am |
| forinfinity
I'd change the test to only show errors when you CAN'T lock the record.
> CASE choice = 68 .OR. choice = 100
IF ! RLOCK()
> (error messages indicating file in use are here)
> ELSE
> (actions performed when pressing D or d keys)
> ENDIF
If the above isn't your actual code but a typo when entered in your post then
I'd suggest you post the actual code of the UDF.
HTH
Steve
| |
| forinfinity 2006-01-10, 3:55 am |
| Sorry, here:
Thisis the UDF for Delete record...
CASE BDCHOICE = 68 .OR. BDCHOICE = 100
IF RLOCK()
SET COLOR TO W+/R
@ 10,5 CLEAR TO 14,50
@ 10,5,14,50 BOX DOUBLE
STORE "N" TO MDEL
SET CURSOR ON
@ 12,10 SAY "OK TO DELETE THIS ONE? " GET MDEL PICTURE "!"
READ
IF MDEL = "N"
SET COLOR TO W+/GR
SET CURSOR OFF
ELSE
TONE(1000,3)
DELETE
SET COLOR TO W+/GR
GOTO BOTTOM
GOTO TOP
SET CURSOR OFF
ENDIF
ELSE
SET COLOR TO W+/R
@ 10,5 CLEAR TO 14,50
@ 10,5,14,50 BOX DOUBLE
@ 12,10 SAY "RECORD IN USE, PLEASE WAIT"
TONE(500,2)
INKEY(0)
SET COLOR TO W+/GR
ENDIF
"Stephen Quinn" <steveq@NOSPAMintegritynet.com.au> wrote in message
news:FDpuf.167313$V7.6685@news-server.bigpond.net.au...
> forinfinity
>
> I'd change the test to only show errors when you CAN'T lock the record.
>
>
> IF ! RLOCK()
>
>
> If the above isn't your actual code but a typo when entered in your post
then
> I'd suggest you post the actual code of the UDF.
>
> HTH
> Steve
>
>
| |
| Ron Pinkas 2006-01-10, 3:55 am |
| > ERROR BASE/1072 ARGUMENT ERROR <>
1. Please post the complete call stack.
2. Please post the expressions for all INDEXes of the involved dbf.
Ron
| |
| Stephen Quinn 2006-01-10, 3:55 am |
| forinfinity
I see nothing overtly wrong with the code.
Best suggestion I can give is to apply the updates and get your Clipper version
upto 5.2e.
You might try reading the docs in the updates to see what bugs were fixed (over
100 in 5.2c->5.2d IIRC) for each version to see if any/what problems were
addressed in the areas involved (ie the RDD).
You might also like to dump DBEdit and switch to TBrowse.
HTH
Steve
| |
| forinfinity 2006-01-10, 3:55 am |
|
"Ron Pinkas" <Ron@remove-this.xharbour.com> wrote in message news:icxuf.3701$ZA5.3037@fed1read05...
>
> 1. Please post the complete call stack.
> 2. Please post the expressions for all INDEXes of the involved dbf.
>
> Ron
>
>
for #1, I will post the entire file for this program procedure, not sure what you mean exactly by #2.
SET DELETED ON
private bdfields[6]
bdfields[1]:= "BREED"
BDFIELDS[2]:= "SEX"
BDFIELDS[3]:= "DOB"
BDFIELDS[4]:= "PUPPYNUM"
BDFIELDS[5]:= "PRICESELL"
BDFIELDS[6]:= "COLOR"
private bdpics[6]
bdpics[1]:= "!!!!!!!!!!!!!!!!!!!!"
BDPICS[2]:= "!"
BDPICS[3]:= "99/99/9999"
BDPICS[4]:= "!!!!!!!!!!"
BDPICS[5]:= "9,999.99"
BDPICS[6]:= "!!!!!!!!!!!!!!!"
private bdnames[6]
BDNAMES[1]:= "BREED"
BDNAMES[2]:= "S"
BDNAMES[3]:= "D.O.B."
BDNAMES[4]:= "PUPPY #:"
BDNAMES[5]:= "PRICE"
BDNAMES[6]:= "COLOR"
SELECT 4
USE PUPLIST SHARED
INDEX ON BREED TO BREEDIDX
DO WHILE (LASTKEY() != 27)
BSCREEN = SAVESCREEN(3,0,24,79)
SET COLOR TO W+/GR
@ 0,0 CLEAR TO 24,79
@ 1,7 SAY "PUPPY LIST / INVENTORY MAINTENANCE"
@ 24,0 SAY "(A)DD, (D)EL, (E)DIT, (SPACE) TO VIEW, (S)ELL, (M)ED, (ESC)"
DBEDIT(3,0,22,79,BDFIELDS,"BDFUNCT99",BDPICS,BDNAMES)
ENDDO
RESTSCREEN(3,0,24,79,BSCREEN)
FUNCTION bdfunct99
parameters statusBD, fld_ptrBD
private requestBD
key_stroke:= LastKey()
if (statusBD = 4)
requestBD:= keyxceptBD(key_stroke)
else
requestBD:= 1
endif
return requestBD
********************************
function KEYXCEPTBD
parameters BDCHOICE
DO CASE
CASE BDCHOICE = 27
* PACK
return 0
CASE BDCHOICE = 68 .OR. BDCHOICE = 100
IF RLOCK()
SET COLOR TO W+/R
@ 10,5 CLEAR TO 14,50
@ 10,5,14,50 BOX DOUBLE
STORE "N" TO MDEL
SET CURSOR ON
@ 12,10 SAY "OK TO DELETE THIS ONE? " GET MDEL PICTURE "!"
READ
IF MDEL = "N"
SET COLOR TO W+/GR
SET CURSOR OFF
ELSE
TONE(1000,3)
DELETE
SET COLOR TO W+/GR
GOTO BOTTOM
GOTO TOP
SET CURSOR OFF
ENDIF
ELSE
SET COLOR TO W+/R
@ 10,5 CLEAR TO 14,50
@ 10,5,14,50 BOX DOUBLE
@ 12,10 SAY "RECORD IN USE, PLEASE WAIT"
TONE(500,2)
INKEY(0)
SET COLOR TO W+/GR
ENDIF
CASE BDCHOICE = 77 .OR. BDCHOICE = 109
DDD=SAVESCREEN(7,10,19,70)
SET COLOR TO W+/B
@ 7,10 CLEAR TO 19,70
@ 7,10,19,70 BOX DOUBLE
STORE PUPPYNUM TO MPN
STORE BREED TO MBRD
SELECT 3
USE MEDICAL SHARED
INDEX ON VPUPPYNUM TO MEDINDEX
SEEK MPN
IF .NOT. FOUND()
@ 10, 12 SAY "NO MEDICAL HISTORY ON FILE FOR"
@ 11, 12 SAY "THIS ONE. TO ADD HISTORY PLEASE"
@ 12, 12 SAY "GO TO THE MAIN MENU AND SELECT"
@ 13, 12 SAY "CHOICE NUMBER 7"
TONE (500,2)
INKEY(0)
SELECT 4
SET COLOR TO W+/GR
RESTSCREEN(7,10,19,70,DDD)
ELSE
@ 7,12 SAY " MEDICAL / VACCINATION HISTORY: "
@ 8,14 SAY "BREED: "+MBRD+" PUPPY #: "+MPN
INDEX ON VPUPPYNUM TO MEDINDEX FOR VPUPPYNUM=MPN
STORE 11 TO MLIN
@ 10,14 SAY "DATE: RECORD:"
DO WHILE .NOT. EOF()
@ MLIN,14 SAY VDATE PICTURE "99/99/9999"
@ MLIN,28 SAY VINFO PICTURE " !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
"
MLIN=MLIN+1
SKIP 1
ENDDO
INKEY(0)
SELECT 4
SET COLOR TO W+/GR
RESTSCREEN(7,10,19,70,DDD)
ENDIF
CASE BDCHOICE = 83 .OR. BDCHOICE = 115
IF RLOCK()
STORE BREED TO MBREED
STORE SEX TO MSEX
STORE DOB TO MDOB
STORE PUPPYNUM TO MPUPPYNUM
STORE PRICESELL TO MPRICESELL
STORE COLOR TO MCOLOR
STORE BREEDER TO MBREEDER
STORE SHIPPER TO MSHIPPER
STORE LITTER TO BLITTER
STORE SIRE TO BSIRE
STORE DAM TO BDAM
STORE LITTER TO BLITTER
SAVE SCREEN TO PLISTTEMP
DO ADDSALE2
SELECT 4
IF SADD != "N"
DELETE
ENDIF
GOTO BOTTOM
GOTO TOP
RESTORE SCREEN FROM PLISTTEMP
UNLOCK
ELSE
SET COLOR TO W+/R
@ 10,5 CLEAR TO 14,50
@ 10,5,14,50 BOX DOUBLE
@ 12,10 SAY "RECORD IN USE, PLEASE WAIT"
TONE(500,5)
SET COLOR TO W+/GR
ENDIF
CASE BDCHOICE = 97 .OR. BDCHOICE = 65
IF FLOCK()
STORE DATE() TO BENTERED
STORE " " TO BBREED
STORE " " TO BSEX
STORE CTOD('00/00/0000') TO BDOB
STORE " " TO BPUPPYNUM
STORE " " TO BREG
STORE 0 TO BPRICESELL
STORE 0 TO BPRICEPD
STORE " " TO BCOLOR
STORE " " TO BCOMPUTER
STORE " " TO BBREEDER
STORE " " TO BSHIPPER
STORE " " TO BDAM
STORE " " TO BSIRE
STORE " " TO BLITTER
STORE " " TO BUNFIT
SET COLOR TO W+/G
BENTRY = SAVESCREEN(2,15,19,60)
@ 2,15 CLEAR TO 19,60
@ 2,15,19,60 BOX DOUBLE
@ 2,16 SAY "³ PUPPY INFO SCREEN: ³"
**** say
@ 3, 17 SAY " DATE ENTERED:"
@ 4, 17 SAY " BREED:"
@ 5, 17 SAY " SEX:"
@ 6, 17 SAY " DATE OF BIRTH:"
@ 7, 17 SAY " PUPPY NUMBER:"
@ 8, 17 SAY "REGISTRATION:"
@ 9, 17 SAY " PRICE:"
@ 10,17 SAY " COST:"
@ 11,17 SAY " COLOR:"
@ 12,17 SAY " MICROCHIP:"
@ 13,17 SAY " BREEDER:"
@ 14,17 SAY " SHIPPER:"
@ 15,17 SAY " SIRE NUMBER:"
@ 16,17 SAY " DAM NUMBER:"
@ 17,17 SAY " LITTER NUMBER:"
@ 18,17 SAY " UNFIT NOTES:"
*** get
SET CURSOR ON
@ 3, 33 GET BENTERED
@ 4, 33 GET BBREED WHEN BREEDSEL2() PICTURE "!!!!!!!!!!!!!!!!!!!!"
@ 5, 33 GET BSEX PICTURE "!"
@ 6, 33 GET BDOB PICTURE "99/99/9999"
@ 7, 33 GET BPUPPYNUM PICTURE "!!!!!!!!!!!!!!!"
@ 8, 33 GET BREG PICTURE "!!!!!!!!!!"
@ 9, 33 GET BPRICESELL PICTURE "99,999.99"
@ 10,33 GET BPRICEPD PICTURE "99,999.99"
@ 11,33 GET BCOLOR PICTURE "!!!!!!!!!!!!!!"
@ 12,33 GET BCOMPUTER PICTURE "!!!!!!!!!!!!"
@ 13,33 GET BBREEDER PICTURE "!!!!!!!!!!!!!!"
@ 14,33 GET BSHIPPER PICTURE "!!!!!!!!!!!!!!!!!!!!!!!!!"
@ 15,33 GET BSIRE PICTURE "!!!!!!!!!!!!!!!"
@ 16,33 GET BDAM PICTURE "!!!!!!!!!!!!!!!"
@ 17,33 GET BLITTER PICTURE "!!!!!!!!!!!!!!!"
@ 18,33 GET BUNFIT PICTURE "!!!!!!!!!!!!!!!!!!!!!!!!!"
READ
STORE "Y" TO BOK
@ 19,25 SAY "³ OK TO SAVE? " GET BOK PICTURE "!"
READ
IF BOK != "Y"
SET CURSOR OFF
RESTSCREEN(2,15,19,60,BENTRY)
RETURN
ENDIF
SET CURSOR OFF
*** SAVE
APPEND BLANK
REPLACE ENTERED WITH BENTERED
REPLACE BREED WITH BBREED
REPLACE SEX WITH BSEX
REPLACE DOB WITH BDOB
REPLACE PUPPYNUM WITH BPUPPYNUM
REPLACE REG WITH BREG
REPLACE PRICESELL WITH BPRICESELL
REPLACE PRICEPD WITH BPRICEPD
REPLACE COLOR WITH BCOLOR
REPLACE COMPUTER WITH BCOMPUTER
REPLACE BREEDER WITH BBREEDER
REPLACE SHIPPER WITH BSHIPPER
REPLACE DAM WITH BDAM
REPLACE SIRE WITH BSIRE
REPLACE LITTER WITH BLITTER
REPLACE UNFIT WITH BUNFIT
RESTSCREEN(2,15,19,60,BENTRY)
UNLOCK
RETURN
ELSE
SET COLOR TO W+/R
@ 10,5 CLEAR TO 14,50
@ 10,5,14,50 BOX DOUBLE
@ 12,10 SAY "DATABASE IN USE, PLEASE WAIT"
TONE(500,5)
SET COLOR TO W+/GR
ENDIF
CASE BDCHOICE = 32
*** LABELS
SET COLOR TO W+/G
BENTRY = SAVESCREEN(2,15,19,60)
@ 2,15 CLEAR TO 19,60
@ 2,15,19,60 BOX DOUBLE
@ 2,16 SAY "³ PUPPY INFO SCREEN: ³"
@ 3, 17 SAY " DATE ENTERED:"
@ 4, 17 SAY " BREED:"
@ 5, 17 SAY " SEX:"
@ 6, 17 SAY " DATE OF BIRTH:"
@ 7, 17 SAY " PUPPY NUMBER:"
@ 8, 17 SAY " REGISTRATION:"
@ 9 ,17 SAY " PRICE:"
@ 10,17 SAY " COST:"
@ 11,17 SAY " COLOR:"
@ 12,17 SAY " MICROCHIP:"
@ 13,17 SAY " BREEDER:"
@ 14,17 SAY " SHIPPER:"
@ 15,17 SAY " SIRE NUMBER:"
@ 16,17 SAY " DAM NUMBER:"
@ 17,17 SAY " LITTER NUMBER:"
@ 18,17 SAY " UNFIT NOTES:"
*** DATA
SET CURSOR OFF
SET COLOR TO GR+/G
@ 3, 33 SAY ENTERED
@ 4, 33 SAY BREED PICTURE "!!!!!!!!!!!!!!!!!!!!"
@ 5, 33 SAY SEX PICTURE "!"
@ 6, 33 SAY DOB PICTURE "99/99/9999"
@ 7, 33 SAY PUPPYNUM PICTURE "!!!!!!!!!!!!!!!"
@ 8, 33 SAY REG PICTURE "!!!!!!!!!!"
@ 9 ,33 SAY PRICESELL PICTURE "99,999.99"
@ 10,33 SAY PRICEPD PICTURE "99,999.99"
@ 11,33 SAY COLOR PICTURE "!!!!!!!!!!!!!!"
@ 12,33 SAY COMPUTER PICTURE "!!!!!!!!!!!!"
@ 13,33 SAY BREEDER PICTURE "!!!!!!!!!!!!!!"
@ 14,33 SAY SHIPPER PICTURE "!!!!!!!!!!!!!!!!!!!!!!!!!"
@ 15,33 SAY SIRE PICTURE "!!!!!!!!!!!!!!!"
@ 16,33 SAY DAM PICTURE "!!!!!!!!!!!!!!!"
@ 17,33 SAY LITTER PICTURE "!!!!!!!!!!!!!!!"
@ 18,33 SAY UNFIT PICTURE "!!!!!!!!!!!!!!!!!!!!!!!!!"
INKEY(0)
RESTSCREEN(2,15,19,60,BENTRY)
RETURN
CASE BDCHOICE = 69 .OR. BDCHOICE = 101
IF RLOCK()
SET COLOR TO W+/G
**** say
BENTRY = SAVESCREEN(2,15,19,60)
@ 2,15 CLEAR TO 19,60
@ 2,15,19,60 BOX DOUBLE
@ 2,16 SAY "³ PUPPY INFO SCREEN: ³"
@ 3, 17 SAY " DATE ENTERED:"
@ 4, 17 SAY " BREED:"
@ 5, 17 SAY " SEX:"
@ 6, 17 SAY " DATE OF BIRTH:"
@ 7, 17 SAY " PUPPY NUMBER:"
@ 8, 17 SAY " REGISTRATION:"
@ 9 ,17 SAY " PRICE:"
@ 10,17 SAY " COST:"
@ 11,17 SAY " COLOR:"
@ 12,17 SAY " MICROCHIP:"
@ 13,17 SAY " BREEDER:"
@ 14,17 SAY " SHIPPER:"
@ 15,17 SAY " SIRE NUMBER:"
@ 16,17 SAY " DAM NUMBER:"
@ 17,17 SAY " LITTER NUMBER:"
@ 18,17 SAY " UNFIT NOTES:"
*** get
SET CURSOR ON
@ 3, 33 SAY ENTERED
@ 4, 33 GET BREED PICTURE "!!!!!!!!!!!!!!!!!!!!"
@ 5, 33 GET SEX PICTURE "!"
@ 6, 33 GET DOB PICTURE "99/99/9999"
@ 7, 33 GET PUPPYNUM PICTURE "!!!!!!!!!!!!!!!"
@ 8, 33 GET REG PICTURE "!!!!!!!!!!"
@ 9, 33 GET PRICESELL PICTURE "99,999.99"
@ 10,33 GET PRICEPD PICTURE "99,999.99"
@ 11,33 GET COLOR PICTURE "!!!!!!!!!!!!!!"
@ 12,33 GET COMPUTER PICTURE "!!!!!!!!!!!!"
@ 13,33 GET BREEDER PICTURE "!!!!!!!!!!!!!!"
@ 14,33 GET SHIPPER PICTURE "!!!!!!!!!!!!!!!!!!!!!!!!!"
@ 15,33 GET SIRE PICTURE "!!!!!!!!!!!!!!!"
@ 16,33 GET DAM PICTURE "!!!!!!!!!!!!!!!"
@ 17,33 GET LITTER PICTURE "!!!!!!!!!!!!!!!"
@ 18,33 GET UNFIT PICTURE "!!!!!!!!!!!!!!!!!!!!!!!!!"
READ
TONE(1000,1)
SET CURSOR OFF
RESTSCREEN(2,15,19,60,BENTRY)
UNLOCK
ENDIF
RETURN
ENDCASE
FUNCTION breedsel2
if (SubStr(bbreed, 1, 5) = " ")
tone(1000, 1)
* @ 23, 0 clear
afsc:= SaveScreen(3, 48, 24, 70)
select 2
set color to W+/B
@ 3, 48, 24, 70 box double
@ 3, 50 say " BREED SELECTION "
set color to W+/R
@ 24, 50 say " ENTER TO SELECT "
set color to W+/B
private BD_fF[1]
BD_fF[1]:= "BREEDNAME"
use BREEDS INDEX BREEDNAME
dbedit(4,49,23,69,BD_fF)
mBD2:= BREEDNAME
RestScreen(3,48,24,70,afsc)
close
select 4
BBREED:=mBD2
return .T.
else
return .T.
endif
| |
| Ron Pinkas 2006-01-10, 3:55 am |
| > for #1, I will post the entire file for this program procedure
The actual Procedure Call Stack reported by the Error handler, may be more
helpful in this case, for understanding the error.
> not sure what you mean exactly by #2.
Do you have any INDEXes for this database? I'm intrested in seeing the index
expression used, in such code as:
INDEX ON <IndexExp...> [TAG ... ] [TO ...], etc.
Ron
| |
| Stephen Quinn 2006-01-10, 3:55 am |
| forinfinity
d/l the Grumpfish library from the OASIS. In tghere you'll find an error handler
which will dump the information that Ron's asking for - to printer or text file.
From the listing code you never close this DBF.
SELECT 3
USE MEDICAL SHARED
INDEX ON VPUPPYNUM TO MEDINDEX
SEEK MPN
IF ! FOUND()
ELSE
INDEX ON VPUPPYNUM TO MEDINDEX FOR VPUPPYNUM=MPN
// Possibly use a FILTER here instead of recreating the index each time
but you overwrite the same index again and again, this may be the cause of your
problem on a network.
Really depends if you have 2 users accessing the file at the same time when you
get the error.
HTH
Steve
| |
| AUGE_OHR 2006-01-10, 3:55 am |
| hi,
> SELECT 4
> USE PUPLIST SHARED
> INDEX ON BREED TO BREEDIDX
how does this work ? you do not use your DBF "exclusiv" or FLOCK() ?
how can you create a Index ?
.... and "normal" (not temporary) Index shoud be create only if not exist.
> SELECT 3
> USE MEDICAL SHARED
> INDEX ON VPUPPYNUM TO MEDINDEX
same here
> INDEX ON VPUPPYNUM TO MEDINDEX FOR VPUPPYNUM=MPN
now you use the same Index but different IndexKey() ... confusing
use 2 different Index : MedInd1 , MedInd2 and use "Set order to"
to "switch" between MedInd1 / MedInd2
in a Network it is not common to change IndexKey() of a Index
while it is running !
> use BREEDS INDEX BREEDNAME
this is right !
greetings by OHR
Jimmy
| |
| forinfinity 2006-01-10, 3:55 am |
|
"Ron Pinkas" <Ron@remove-this.xharbour.com> wrote in message
news:BPJuf.4139$ZA5.187@fed1read05...
>
> The actual Procedure Call Stack reported by the Error handler, may be more
> helpful in this case, for understanding the error.
>
>
> Do you have any INDEXes for this database? I'm intrested in seeing the
index
> expression used, in such code as:
>
It's in the code block I uploaded, line 25.
> INDEX ON <IndexExp...> [TAG ... ] [TO ...], etc.
>
> Ron
>
>
| |
| forinfinity 2006-01-10, 3:55 am |
|
>
> but you overwrite the same index again and again, this may be the cause of
your
> problem on a network.
> Really depends if you have 2 users accessing the file at the same time
when you
> get the error.
>
> HTH
> Steve
>
Actually, when the code works the database can be in use by as many people
at once as is users on the network, the first time someone commits an edit,
append or delete the error shows up.
Also I noticed, as this is a custom built program, in the environment the
program is running, any 2 or more Windows 2000 computers can share the open
database, Windows 98 PCs crash the program and boot out to the OS.
I just don't understand what the hell Argument Error <> is supposed to mean.
It is the most non-specific error the runtime environment produces. Also
there is little to no explanation or resolution guide for it.
I just don't understand why, if the environment can produce this error,
there had to be a cause, right? Why not just state what the hell it is?
| |
| Ian Boys 2006-01-10, 3:55 am |
| From your code:
USE PUPLIST SHARED
INDEX ON BREED TO BREEDIDX
I don't see this as multi-user network code. The first user is OK, the next
user then just recreates the index without regard to any other current
users. It's no surprise that at the first commit it's not happy. Is there a
need to recreate the index each time? If not, don't do it, if there is then
use the database exclusively to index it. If you can't use the database
exclusively then you should not be indexing it.
Ian Boys
DTE
| |
| Ron Pinkas 2006-01-10, 3:55 am |
| > I just don't understand what the hell Argument Error <> is supposed to
> mean.
It means that your application get to a point where it compares incompatible
types using the <> or != or # operator. Like this:
IF 1 <> "Wrong to compare NUMERIC agaist STRING"
This may also happen inplcitly in other code such as system code as a result
of wrong coding earlier. For example your bad practice with regard to
indexes.
> It is the most non-specific error the runtime environment produces. Also
> there is little to no explanation or resolution guide for it.
I believe you are wrong, the Error is very specific, and it does provide all
the information regarding the EXACT pint in code it happens - this is called
the CALL Stack, but you seem to be ignoring my hints and request fot that
information.
> I just don't understand why, if the environment can produce this error,
> there had to be a cause, right? Why not just state what the hell it is?
Why not try to understand what is a CALL Stack, and review what information
it provides?
Ron
| |
| Stephen Quinn 2006-01-10, 3:55 am |
| forinfinity
> I just don't understand what the hell Argument Error <> is supposed to mean.
> It is the most non-specific error the runtime environment produces. Also
> there is little to no explanation or resolution guide for it.
User1 opens the dbf and creates an index on VPUPPYNUM, finds a valid one to work
with and then overwites the current index with a new expression (FOR CLAUSE)
User2 opens the dbf and creates an index on VPUPPYNUM, at this point User1s
second index has been trashed.
User3 opens the dbf and creates an index on VPUPPYNUM, at this point User1/2
indices have been trashed.
User4 opens the dbf and creates an index on VPUPPYNUM, at this point User1/2/3
indices have been trashed.
User1 now tries to write to the the DBF using invalid index data - error!!!
See what can happen in a network environment with the code your using.
HTH
Steve
| |
| forinfinity 2006-01-10, 3:55 am |
| You guys have all made a very enlightening point about the indexes. I will
modify the code to incorporate that. Only one thing, do you think that this
error would still come up when there is only one user in the program.
It does, and that is confusing. How can I find out exactly what Arguments
are in error?
"Stephen Quinn" <steveq@NOSPAMintegritynet.com.au> wrote in message
news:mBmvf.195137$V7.44632@news-server.bigpond.net.au...
> forinfinity
>
mean.[color=darkred]
Also[color=darkred]
> User1 opens the dbf and creates an index on VPUPPYNUM, finds a valid one
to work
> with and then overwites the current index with a new expression (FOR
CLAUSE)
>
> User2 opens the dbf and creates an index on VPUPPYNUM, at this point
User1s
> second index has been trashed.
>
> User3 opens the dbf and creates an index on VPUPPYNUM, at this point
User1/2
> indices have been trashed.
>
> User4 opens the dbf and creates an index on VPUPPYNUM, at this point
User1/2/3
> indices have been trashed.
>
> User1 now tries to write to the the DBF using invalid index data -
error!!!
>
> See what can happen in a network environment with the code your using.
>
> HTH
> Steve
>
>
| |
| Ron Pinkas 2006-01-10, 3:55 am |
| > It does, and that is confusing. How can I find out exactly what Arguments
> are in error?
By re-reading the replies you got (CALL Stack), and reading the docs about
Clipper's ErrorBlock(), and teh Error Class.
http://www.xharbour.com/xhdn/index....i=20&show_sub=3
Ron
| |
| AUGE_OHR 2006-01-10, 3:55 am |
| hi,
> You guys have all made a very enlightening point about the indexes. I
will
> modify the code to incorporate that. Only one thing, do you think that
this
> error would still come up when there is only one user in the program.
as i can see in your source you start with :
SELECT 4
USE PUPLIST SHARED
INDEX ON BREED TO BREEDIDX
....
DBEDIT(3,0,22,79,BDFIELDS,"BDFUNCT99",BDPICS,BDNAMES)
all these BDxxxx Elements belong to PUPLIST, right ?
now somewhere in your UDF you change WorkArea like :
SELECT 3
USE MEDICAL SHARED
INDEX ON VPUPPYNUM TO MEDINDEX
SEEK MPN
IF .NOT. FOUND()
....
ELSE
....
ENDIF
but i can´t see that you have saved "Old" WorkArea ?
nOldSelect := SELECT() // save WorkArea
SELECT nSomeWhere
....
SELECT(nOldSelect) // restore WorkArea
before you return you UDF
greetings by OHR
Jimmy
| |
| forinfinity 2006-01-10, 3:55 am |
| Well, here's to all of you out there, and to one dumb coder over here. I
think I may have solved the problem. I was stuck on the whole idea that the
editing of a record was coming up Argument error even if there was only one
user involved. Then it hit me. Maybe it was the data inside the record....
The first thing I did was take the advice of merely SETting INDEX TO instead
of INDEX ON ... TO. I implementd that so the index wasn't being recreated
every 3 seconds.
That didn't make the error go away, but I did something else..... After
making sure that every code block returning RLOCK() as .T. had an unlock in
the correct place, then I just added a COMMIT above each unlock.
Apparently, as someone suggested was the case with INDEXING constantly, the
Argument error was that the data after edit was diiferent from before edit,
and needed the COMMIT to check as correct.
<whew>, after I make my first million you guys all get a cut...
Thanks again.
"Ron Pinkas" <Ron@remove-this.xharbour.com> wrote in message
news:BaKvf.4807$ZA5.2385@fed1read05...
Arguments[color=darkred]
>
> By re-reading the replies you got (CALL Stack), and reading the docs about
> Clipper's ErrorBlock(), and teh Error Class.
>
>
http://www.xharbour.com/xhdn/index....i=20&show_sub=3
>
> Ron
>
>
|
|
|
|
|