Discussion:
VFPOLEDB 8.0 & 9.0 does not support TRY, CATCH TO etc.
(too old to reply)
Mikael Olsson
2004-12-31 12:14:32 UTC
Permalink
Hi,

I'm trying to insert a record into a foxpro table using
the VFPOLEDB driver. The table uses a validation rule
that triggers a stored procedure. The stored procedure
fails if i include the new error expression syntax
(TRY, CATCH TO etc.) that came in VFP 8.0.

To confirm the problem i created a simple stored
procedure that looks like this.

Function Test
Local m.llReturn
TRY
m.llReturn = .T.
CATCH TO oEx
m.llReturn = .F.
ENDTRY
Return (m.llReturn)
EndFunc


If i try to insert into the table i get an error. But if i remove
all of the error expression code in the validation rule (stored
procedure) it works.

Function Test
Local m.llReturn
m.llReturn = .T.
m.llReturn = .F.
Return (m.llReturn)
EndFunc

I've tried both VFPOLEDB version 8.0(SP1) and 9.0 (beta).
None of them seems to work.

Can anyone confirm that the current VFPOLEDB drivers does
not support stored procedures which includes TRY, CATCH TO
etc.


Regards, Mikael Olsson
Anders Altberg
2005-01-03 00:57:43 UTC
Permalink
Hej Mikael
TRY - ENDTRY is not included in the list of supported commands and functions
for VFPOLEDB 9. CATCH can create an Exception object and VFPOLEDB doesn't
support object creation either.
ON ERROR, ERROR(), PROGRAM() and MESSAGE() are supported.
-Anders
VFP MVP
Post by Mikael Olsson
Hi,
I'm trying to insert a record into a foxpro table using
the VFPOLEDB driver. The table uses a validation rule
that triggers a stored procedure. The stored procedure
fails if i include the new error expression syntax
(TRY, CATCH TO etc.) that came in VFP 8.0.
To confirm the problem i created a simple stored
procedure that looks like this.
Function Test
Local m.llReturn
TRY
m.llReturn = .T.
CATCH TO oEx
m.llReturn = .F.
ENDTRY
Return (m.llReturn)
EndFunc
If i try to insert into the table i get an error. But if i remove
all of the error expression code in the validation rule (stored
procedure) it works.
Function Test
Local m.llReturn
m.llReturn = .T.
m.llReturn = .F.
Return (m.llReturn)
EndFunc
I've tried both VFPOLEDB version 8.0(SP1) and 9.0 (beta).
None of them seems to work.
Can anyone confirm that the current VFPOLEDB drivers does
not support stored procedures which includes TRY, CATCH TO
etc.
Regards, Mikael Olsson
Loading...