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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problems executing procedure in Oracle

Status
Not open for further replies.

hagaleano

Programmer
Jul 24, 2003
8
BR
Hi!

I´m working with vfp9 and Oracle 9 like DBMS. I have a connection and i need to execute a procedure. When i use SQLCONNECT with a simple SQL statement (select * ...) it works fine, but when i run the procedure i receive -1 (cannot execute).

I have all rights in oracle to run the procedure, i test executing in SQLPLUS and it works.

this is the statement
vHnd = SQLEXEC('exec Create_seq') &&Invoking procedure

Thanks in advance

Hugo
 

Hugo,

You need to pass the connection handle as the first parameter to SQLEXEC, like so:

vHnd = SQLEXEC(lnConn, 'exec Create_seq') &&Invoking procedure

where lnConn is the handle returned from SQLCONNECT() or SQLSTRINGCONNECT().

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

My sites:
Visual FoxPro (www.ml-consult.demon.co.uk)
Crystal Reports (www.ml-crystal.com)
 
Yeah Mike!!

You´re right i forgot to put the handle in my message. In my program i'm usign with the handle.

this is my correct line

vHnd = SQLEXEC(vHandle,'execute CREATE_SEQ')
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top