Information générale
Catégorie:
Code, syntaxe and commandes
Versions des environnements
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.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement