View Complete Post
would any body please help me to catch the exception if the column doesnot exist as my table columns are not static.
sometimes its throwing me indexoutofrange exception as the column doesnot exist
thanks for the help guys
If multiple threads concurrently execute code that writes to or modifies a resource, then obviously the resource must be protected with a thread synchronization lock to ensure that the resource doesn't get corrupted.
MSDN Magazine June 2006
Here at MSDN Magazine, we get a lot of mail from readers. As you can imagine, much of it involves fulsome praise for our content, our eye-catching covers, or the handsome photo that now graces this page.
MSDN Magazine June 2005
MSDN Magazine August 2002
I've read up on this error from other posts and on other sites, but haven't found a solid resolution to the issue yet. My setup is as follows:
I have a RepositoryBase class that fields certain db calls that all repositories need to perform. In one such call, "GetSecurityGroup", it works most of the time, but will seemingly at random throw an exception with the error "Invalid attempt to call Read when reader is closed." All other Repository classes inherit from this one, and they all use the same DataContext object, which I understand isn't thread safe. Since there could be multiple calls to the DataContext object on the same page, perhaps one is using the DataContext when the next tries to do so. I'm not sure. What can I do to ensure this doesn't happen?
i have a sql table like
now the following code i have in aspx.cs
sqlcommad cmd=n ew sqlcommad("select sum(toffee) from table where name='ravi'");
problem cms here even there is no name in table with ravi still dr reads when i debug my programm and show me null excepton as it returns null value form table.why it is not going in else part
someone pls help me??????????
I recently set up transactional replication from one server database to another server database.ÃÂ I keep getting a Log Reader Agent error:ÃÂ An access violation occurred.ÃÂ
The SQL Server agent starts under one Windows account but the Server is registered under the system account.ÃÂ The log reader agent is using the system account.
I'm not sure what else to check or what database permissions or roles should be set.ÃÂ Can somebody help?ÃÂ Thanks.
I'm making the leap from using all the 'wizards' that are built into VS, and have been doing more with code-behinds. But, I'm curious as to when/why I should use a reader, versus a databable, table adaptor to "manage" the data returned from a stored procedure. Typically, the data is to be displayed on a webpage, and not written back to the database. What's the difference? When should I use one over another?