Hello, I would like to know if there are any pitfalls on calling a static method from an ASP.NET web service.
internal static object SelectScalar(String commandText, DataBaseEnum dataBase)
{
SqlConnection sqlc = new SqlConnection(AuthDbConnection.GetDatabaseConnectionString());
object returnval=null;
if (sqlc!=null)
{
SqlCommand sqlcmd = sqlc.CreateCommand();
sqlcmd.CommandText = commandText;
sqlc.Open();
returnval = sqlcmd.ExecuteScalar();
}
return returnval;
}
So for an example the method above; are there any pitfalls on multiple web methods and multiple clients calling this method at the same time (say, 1000 calls to a web method that calls this function)?