I tried to find answers to this, but I wasnt sure how to search considering my issue. Let me explain as best as I can. I have an asp.net 2.0 project in visual studio 2005. I created a basic page with a datagrid that returns data and updates on a button command. I used the standard wizard stuff to generate the datasource and command parameters, etc. This page connects to a remote db and works fine. I also have a more detailed form that I created where I use my own code to connect to the same remote db. I have used this code in hundreds of projects and it follows the basic format I have in the code snippet.
This form also works very well on my local machine. My problem is that while both pages work on my local machine connecting to the remote SQL server 2005 db, the form I created using the code in the snippet does not work on the staging machine. It just hangs and never gives an error or displays any content.
I can provide more code if it will help, but Im inclined to think its not the db code I use since I use the same code in other projects and since the page does work locally. Ive never had this issue occur in staging.
Thanks for any advice!
DataTable dtS = new DataTable("S");
using (SqlConnection con = new SqlConnection(System.Configuration.ConfigurationManager.ConnectionStrings["ORConnectionString"].ConnectionString))
SqlCommand cmd = new SqlCommand();
cmd = sprocs.procGetCategories(con);
SqlDataAdapter objDa = new SqlDataAdapter(cmd);