Q: Delphi1/ODBC/WatcomSQL/AutoIncrement/Stored Procedure

How do I make all the above work together?  Here's what I did but it's
not working correctly.

In WatcomSQL I created a stored procedure, with one STRING input param
and one INT output param, that inserts a record into a table that has an
autoincrement primary key.  This table has another index on a field that
only has alpha characters, so I created this new record with a numeric
value in the field.  I then read in the primary key of this record,
using the known numeric field value, delete the record and return the
value of the primary key.  This procedure works great and does what it
is suppose to when run interactivly from ISQL.

So I added a stored procedure object on a form, along with a ttable and
associated objects.  On the PrePost event of the ttable, I want to call
the stored procedure so I prepare/set param/execSQL/read param/close.
Now the problem, only the first digit of the numeric string makes it to
the stored procedure, and a return result never makes it back.

Is there anybody that has used this combination that might be able to

Is there a known problem with stored procedures that I don't know about?

Is there a better way to get PK values when autoincrement is used?  ( I
need them because they're the masters in a master/detail relationship
and WatcomSQL is needed for it's stong concurrent user support )

As for the systems, I'm using Delphi C/S 1.0, with the first patch
applied, along with WatcomSQL 4.0c and the ODBC drivers that came with
the WatcomSQL database, all on a Win95 box.

Thanks in advance,

Dave Boswell