Question : Cannot edit table adapters in asp.net website project

Hi,

I've a ASP.NET website project which I picked up from somebody else. I opened the project in visual studio 2008. The website uses Table adapters as middle tier model and uses them extensively in all views. Now, if I want to change something in a table adapter (like adding a new parameter to a stored procedure), I could not do it.

I have a web.config with the Connection string that looks like this:


   
   
 


I open the .xsd file inside App_Code folder and from the design view, I right click on any one of the table adapters and click "Configure" it says - "Unable to find ConnectionString for object 'web.config'. The connection string could not be found in application settings or the data provider could not be loaded".

I look at the .xsd source and I have multiple entries for ConnectionString (Snippet attached). I tried removing the duplicate entries but in vain. I still cannot configure the table adapter.

Does any one know how to circumvent this problem? As a more general question, I'm not very well familiar with table adapters and their design. Are they the best way to design mid-tier model in asp.net applications? I hear a lot about LINQ these days. Any ideas about which is better?
Code Snippet:
1:
2:
3:
4:
5:
6:

        
          
          
          
        

Answer : Cannot edit table adapters in asp.net website project

If your using sql server I highly recomend LINQ over table adapters for as it is truly a more rich data layer for a vs solution.  As far as your current table adapter soluton goes...sometimes when bringing in someone eles code the objects do not come in correctly.    I would create a new project and just use there example to help you create the objects......that would be more beneficial anyways so you can see how to do it.

But if you just create the LINQ on top of your table from SQL Server you will find it to be different but far more easier...Each table becomes an object or class..and all the methods you are used to using through ADO can now be implemented in a more oo approach.
Random Solutions  
 
programming4us programming4us