I can see why you asking...
The thing is that I maintains an application written in swedish with a lot
of businessrules for swedish laws. Such as calendar(worktime) and so on. This
application have to support other countries laws from now.
So I'm testing a method where I connects a usersession to a SPID in
database. Renaming all TABLES and making views with the same name as the
previous tablename. Adding a column to sourcetable telling the row for wich
county it applies to(CountryCode). By doing this I'm hoping that I wont need
to do that much coding in the application, adding countrycode to all WHERE in
SELECTs.
In the views I use SPID in combination with logged on user (usertable
contains countrycode) to resolve wich countrylaws I should apply on the
logged on user.
But to do this I have to get the value for the session saved on SQL-server.
Thats my actual problem, do you have any other ideas??
The database has 2 clienttypes, one win32 and one HTTPclient. The
win32client was no problem using SPIDs, but it seems to be a problem in
HTTPclient.
Kjell
PS. This is a bit of topic I know... Sorry!
"Bob Barrows [MVP]" wrote:
I've never heard of one.
Did you find one in Books Online? That's where I would look. Just to be
sure, you should ask on a sql server group, making sure you let them know
what version of sql server you are using.
Why are you trying to tie a spid to a user? To me, this is a dangerous thing
to be trying to do and can lead to problems for your application. And it
seems to display an ignorance of how http and asp work (don't get all huffy
and defensive - I can only go by what you've written in these posts - I'm
not trying to insult you, just advise you that you may have more to learn).
Maybe this will be of interest:
http://www.aspfaq.com/show.asp?id=2491
Kjell Brandes wrote:
Thanks for your time!!
Do you know if there is any "global variable" where you can ask for
ApplicationName?
like "SELECT @@SPID" for active connection.
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"