Re: Different @@SPID for same user/connection ?!?!?!
- From: "Malcolm Cook" <malcook@xxxxxxxxxxxxxxxx>
- Date: Wed, 23 May 2007 10:21:51 -0500
Hans,
I've never taken this approach.
Do you create the temp tables "on the fly"?
If so, you could create temp tables named after the current user?
If not, why not cache the top-level @@SPID in a program variable and pass it into all your stored procs/view that create/load/move
the records?
I really don't understand your application well enough to make reasonable suggestions....
Good luck. At least now you know why you were getting different values for the @@SPID.
Oh, you also might consider, instead of having subforms, to have two main forms and make the 2n'd be dependent upon the 1st (i.e. in
the "on current" of the 1st, set a hidden form variable which is used to parameterize the query/stored proc of the 2nd form).
Malcolm
"hpesata" <hpesata@xxxxxx> wrote in message news:1179930973.987838.160240@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi Malcolm!
Do you have subforms? If so, then heed these words: "Unlike with other database objects, Access does not always use the same
connection to retrieve the data source of a subform." -http://support.microsoft.com/kb/308312
What is the effect you are trying to acheive by using @@SPID?
thanx for your reply!
yes, I am using subforms and I realized that sometimes my subformy use
a different @@SPID
than the main form, but this doesnt happen with all my forms.
the main-form is usually used to scroll/create/delete records,
the sub-forms display the contents of a specific record.
I am using (temporary) tables where I load a record into, when a user
edits it.
my sub-forms are bound to this temporary tables.
after he finished editing I update it in the real table if he wants to
save the changes.
I am using views to bind the content of a user-specific record to my
form, in this view
I use @@SPID, also in the stored procedures which I use to load/save
records.
therefore I have to store a specific ID for every user within the
records of my temporary table,
to correctly edit/assign user-specific data.
do you have any idea how I can successfully accomplish this ???
regards,
Hans
.
- Follow-Ups:
- Re: Different @@SPID for same user/connection ?!?!?!
- From: hpesata
- Re: Different @@SPID for same user/connection ?!?!?!
- From: Tom Wickerath MDB
- Re: Different @@SPID for same user/connection ?!?!?!
- References:
- Re: Different @@SPID for same user/connection ?!?!?!
- From: hpesata
- Re: Different @@SPID for same user/connection ?!?!?!
- Prev by Date: Re: Different @@SPID for same user/connection ?!?!?!
- Next by Date: Re: ADP (Write to local if loses connection to remote SQL Server?)
- Previous by thread: Re: Different @@SPID for same user/connection ?!?!?!
- Next by thread: Re: Different @@SPID for same user/connection ?!?!?!
- Index(es):
Relevant Pages
|