i am converting an existing asp site over to php (noble cause) and i am
using odbc as my connection layer. i have no problem with statements, but
difficulties with stored procs.
the following is one of the statements i am trying to convert:

<pre>
  Set cmdSub = Server.CreateObject("ADODB.Command")
  With cmdSub
   .ActiveConnection = DBConn

   .CommandText = "sp_edit_UtilCorp"
   .CommandType = 4 ' - adCmdStoredProc
   .Parameters("@UTILCORP_ID") = UTILCORP_ID
   .Parameters("@CoName") = CoName
   .Parameters("@Add1") = Add1
   .Parameters("@Add2") = Add2
   .Parameters("@City") = City
   .Parameters("@State") = State
   .Parameters("@Zip") = Zip
   .Parameters("@Tel") = Tel
   .Parameters("@Fax") = Fax
   .Parameters("@Email") = Email
   .Parameters("@ContactName") = ContactName
   .Execute

   edit_status = .Parameters("@RETURN_VALUE")
  End With
</pre>

i found this under odbc_execute, but it supposedly is unable to give a
return value:
<pre>
$stmt=odbc_prepare($conn_id, "exec my_proc_name ?,?,?");
$parms=array("fred","password",5);
if (!odbc_execute($stmt, &$parms)) die("odbc_execute failed");
</pre>
is it possible to change this to both: explicitly pass the parameters by
name and pass the return value to a variable?????

thx
Ian Ferger




-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to