That's generally a bad thing to do because you could run into concurrency problems and you're not gauranteeing you are getting the correct key.
If you must do it this way which I have had to do in the past due to reasons beyond my control you should lookup on another value as well.
Typically I would insert a short random say 8 characters at the same time then use this to get the correct ID.....
Code:
SELECT Max(PrimaryKeyField )
FROM myTable
WHERE RandomKey = @InsertedRandomKey
hope that makes sence!