General information
Title:
Executing Oracle stored procedures
I have tried the following code in the click event of a foxpro7 button to execute a stored procedure in an Oracle database. I already have a connection and have cursor in VFP7 that displays to a grid but can not execute the stored procedure. What is wrong with this code?
* Make a connection to Oracle table (rissingg.employees)
* (execute delete_emp ) a stored procedure
STORE SQLCONNECT('Oracle_table','user_id','password') TO gnConnHandle
IF gnConnHandle <= 0
=MESSAGEBOX('Cannot make connection',16, 'SQL Connect Error')
ELSE
=MESSAGEBOX('Connection made',48,'SQL Connect Message')
ENDIF
=SQLPREPARE(gnConnHandle,'execute delete_emp')
=SQLEXEC(gnConnHandle)
=MESSAGEBOX('DELETE_EMP HAS RUN',48,'SQLEXEC Message')
** = SQLDISCONNECT(gnConnHandle) && save this line for use later
THISFORM.Refresh
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only