Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Call a DLL from VFP 7.0

Status
Not open for further replies.

MyNeckHurts

Programmer
Apr 5, 2002
34
US
I would like to call a DLL from a FoxPro Procedure. The procedure is in a do while loop. We are running a FoxPro 7.0 front end to a Oracle 8.1.7 database back end. I need to call the following using VB:


if sqlExec(connectionHandle,lcSql ) < 1
handleError( program(), lineNo( 1 ), .t. )
llAbort = .t.
exit
endIf


The lcsql variable calls a stored procedure and returns a date value:

lcSql = [ ;
{call util_pkg.GetRentStepEndDate( ;
?csrRentSteps.PAYMENT_CNT, ;
?csrRentSteps.START_DT, ;
?csrRentSteps.PAYMENT_INTERVAL, ;
?@ldRentStepEnd )}]

The reason I'm trying this approach is that I'm having a problem with a C0000005 error when the sqlexec() fires. We have been running this application for over a year using win 95 and did not have any problems until January 2003 when we upgraded to win 2000. I have tried many different things and even opened a trouble ticket with Microsoft and nothing has worked so far. We have upgraded everything to the latest service pack and driver version (win 2k sp3, vfp 7.0 sp1, mdac, oracle driver...). Any help will be much appreciated...
 
Hi Neck,

I don't know Oracle very well, but in SQL Server I would use a &quot;prepared&quot; procedure. Check the VFP help for the SQLPREPARE() function. If you are calling it many times in a loop, it will be lighter on resources.

Mike
Mike Lewis
Edinburgh, Scotland
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top