>Mark,
>
>
>
>Your select looks fine.  To do the insert you have to do each table in
>turn.  Insert your user into tblOne first and get the UserID that is
>assigned to that new user (I'm assuming that you're using some form of
>auto-increment field for UserID) and then insert the path using the
>UserID that you got from tblOne.

Yes...I have the UserID in the main table (tblOne) set as an identity.

>
>To get the UserID for the new record you have to do either a select
>Max(UserID) as NewUserID from tblOne or a select that you know will
>return the record that you just inserted, eg. a creation date/time and
>some of the user details.  The other alternative is to not use an
>auto-increment field for your UserID and generate your user id, so that
>you know what it will be before doing either insert.

Hmm...nto sure what would be best. I also don't want duplicates.

I got a headache...


>Hope that helps
>
>Regards
>
>Stephen
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to