Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Help calling an Oracle function
I am new to connecting from VFP6 via ODBC to other databases. In the present case, I am able to get connected to an Oracle database via ODBC in VFP6. I have been successful doing SELECT SQLs into cursors to read data from the database. I am having trouble calling/executing oracle functions, though.
I successfully called a function that did not update a table but merely determined whether a password was valid by this method:
l_cConnStr = "SELECT pwadm.PINTEST('098409809','0999')AS PinResult FROM Dual"
rtn = SQLExec(h,l_cConnStr,"crsTest")
However, I was unable to get it to work by what I thought was a straightforward call:
l_cConnStr = "Execute pwadm.PINTEST('098409809','0999')"
rtn = SQLExec(h,l_cConnStr,"crsTest")
Substituting "Call" for "Execute" did not seem to matter. I can live with the top workaround, however I now need to actually Execute or Call a different Oracle function and pass it parameters. I have tried embedding it in a SELECT SQL but it does not work because (I think) this function actually tries to update a table or two:
l_cConnStr = "Execute pwadm.PSINSRT(charvar1,charvar2,datevar1,etc.)"
rtn = SQLExec(h,l_cConnStr,"crsTest2")
Any suggestions?
Thanks in advance!
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement