Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Access Violation

13 views
Skip to first unread message

Stefan Lossien

unread,
Aug 23, 2006, 9:19:40 AM8/23/06
to
I was taking some old Clipper code and added it to VO.

Source code:
SELECT A
USE ahlsell.dbf INDEX ahlsell
SELECT B
USE rab_ahl.dbf INDEX rab_ahl
DO WHILE .NOT. EOF()
cFinna := a->rabatt
SELECT B
SEEK cFinna
IF FOUND()
wRabatt := Val(b->RABATT)/10
IF IsNumeric(wRabatt) // Added as test!
fTest := a->cirka - (a->cirka * wRabatt/100)
IF IsNumeric(fTest) // Added as test!
? RECNO() // Comment out this dummy line will give the
error!
a->netto := fTest // Line 129
ENDIF
ENDIF
ENDIF
SELECT A
SKIP
ENDDO
SELECT A
USE
SELECT B
USE

I’m getting this error in IDE:

An unhandled exception occured in module
VO27RUN.DLL of your application!
Code: 0xC0000005 (EIP=0x100362FF)
Application: Faktura_new_2
Module: Prislista_Ahlsell
Entity: Las_Ahlsell:PushButton_OK, Line 129

When I create an EXE:
***********************ERROR********************************
Visual Objects (Version 2.7. Build 2.2735), Version 2.7b
2006-08-23 13:30:11
Application: D:\CAVO27A\Bin\faktura.exe

Error message:
--------------
Error Code: 50 [ ACCESS VIOLATION ]
Subsystem: VO-CODE
Error Subcode: 5333
Argument Number: 2
Description: Application Code Error causing Access Violation
CallStack:
LAS_AHLSELL:PUSHBUTTON_OK (Line: 129)
STANDARDSHELLWINDOW:DISPATCH (Line: 8)
APP:START (Line: 10)
START (Line: 8)

Error Object created:
--------------------
SubSystem :VO-CODE
SubCode :5333
GenCode :Access Violation
ExceptionCode :C0000005
ExceptionFlags :00000000
ExceptionAddress:1003636B
ParamNumber :2
ExceptionInfo :00000000
Severity :2
CanDefault :.F.
CanRetry :.F.
CanSubstitute :.F.
Operation :
Description :Application Code Error causing Access Violation
FileName :
Tries :0
FileHandle :0
SubCodeText :
Arg :
ArgTypeReq :NIL
MaxSize :0
SubstituteType :NIL
CallFuncSym :
--------------------

To summarize, when the dummy ‘? RECNO()’ is in there it works without
any problems, but when I remove the line, it gives the error above. Can
somebody enlighten me what’s happens?


Stephen Quinn

unread,
Aug 23, 2006, 11:11:13 AM8/23/06
to
Stefan

What types have you declared
fTest
wRabatt

What type and size is the netto field ??

Offhand I'd say fix the code be 'proper' VO and forget the Clipper syntax ASAP

HTH
Steve


GSchaller

unread,
Aug 23, 2006, 6:12:59 PM8/23/06
to
Stefan,

There is no way to know on the info supplied. Use debugoutput strings
(or the debugger) to view the value of fTest. Perhaps it is too big? As
Stephen has suggested, using proper OO VO code might help - this is only
a small amount of code to convert. Also, fully declare your variables
with a data type. It might help.

Geoff


"Stefan Lossien" <nos...@indaut.se> wrote in message
news:MBYGg.14125$E02....@newsb.telia.net:

0 new messages