General information
Category:
Coding, syntax and commands
Environment versions
Network:
Windows 2003 Server
Hi Bonnie,
Thanks for your help on that...when I have a value like a DB Connection String for example. I guess it's not a good idea to save that in a variable that can be access by different methods and functions? Because the only way to do that would be to make the variable static, right? and if someone else logs into the webservice that variable would be "stomped on".
So I take it the only way to do this would be to set a "non-static" variable and pass it throughout all of the calls as a parameter?
Is this the best and/or only way to do it? Or is there something else in this .net world I could be doing? Thanks again for both of your help..
Paul
>Paul,
>
>The Shared is VB. In C#, it's called static. You've probably got a static method or property somewhere (like maybe your connection) that shouldn't be static.
>
>~~Bonnie
>
>
>
>>..snip..
>>>
>>>You probably have the same problem I had recently. Remove the Shared attribute of the related variables/methods and that should work.
>>
>>Thanks for the reply..I'm not sure what you are referring to. Are you talking about the actual variable/method declarations. If so I don't have the word "shared" anywhere on the declarations.
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only