>If you run it in MySQL do you get correctly the OUT parameter?
Attempting to run it in the SQL query window in phpMyAdmin gives:
#1312 - PROCEDURE databasename.sp_ww_NewId can't return a result set in the given context
Looking into that specific error #/message seems to give a lot of confusing info on bugs related to this. While researching the bug I did find an interesting way to do this without a Stored Procedure:
update sometable set id=id+1 where tablename='mytable' and @pnID:=id+1;
select @pnID;
The and @pnID:=id+1 part of the update statement always evaluates to .T.
After the update statement you can just pick up the value of pnID with a select @pnID
I still for the life of me can not get the Stored Procedure thing to work but this looks like a decent workaround.
Brandon Harker
Sebae Data Solutions