Could not open database connection "When creating table adapter in C #

So, I support the software that the former employee made. It uses xsd to create TableAdapters for its reports and other materials.

The thing is, I need to add a new TableAdapter, and I get the above error. It also speaks of the fear "A network-related or specific instance error occurred while establishing a connection to SQL Server."

I'm at a loss here, and I don't know what to do. Here are the facts:

  • I have two connection strings: one for the production environment and one for the development environment (my computer).
  • When I go to settings and then to the connection string edit box, I hit the “test connection” and it says that it works fine.
  • Both SQL Server 2008R2 and Visual Studio 2010 are on the same machine, my machine.
  • I do not have a named instance.
  • I right-click on the xsd design view and click "Add → TableAdapter" and use the local connection string (the one I already tested and worked)
  • I click "Use existing stored procedures" and then click [Next]. Then I can select the stored procedure for the Selection section, and I can see the columns.
  • I click finish, the system locks for a while, and then I get an error.
  • Named pipes, TCP / IP are included in the configuration of SQL Server.

I got a little lost, and I already spent 2 days on it. I tried that I know a little, and nothing works. I hope I can find help in your wisdom.

, .

Connection test

Services status

Protocol status

Connection Selection when creating the TableAdapter

Stored procedure selection

Error

SQL Server Instance

+4
2

, . , .

@Rusland, , . . , , . , .

, .

, . , , - , (localConStr). , . , localConStr ( ) , , , , . .

, TableAdapter , ? , Connection ConStr. ... , : CTRL + F refferences rptTbl_loansAgingTableAdapter. , - , , . , : "creditAgingTableAdapter" , TableAdapter, .

XSD ( XML), , , Connection , TWO!. , , ( , , IDE) :

<Connection AppSettingsObjectName="Settings" AppSettingsPropertyName="localConStr"...

<Connection AppSettingsObjectName="Settings" AppSettingsPropertyName="loanConStr" ...

, , , , . (loanConStr), (loanConStr , , localConStr , , , ).

, DataTables DataSet (localConStr) . , :

  • : DataTable:
  • -: DataTable:

, : . ! -, .

? , , , TableAdapter , , ( ), , -, Visual Studio .

TableAdapter , ? , leavin XSD .

: " Compa, , , localConStr?" , , , .

, TL; DR: xds dataset, , , TableAdapters ConnectionString, xsd

PropertiesError

+4

, . ( , ).

.

GRANT EXECUTE on [dbo].[rpt_loansAging] to [TheSqlAuthenticationUserNameWeCannotSeeInTheScreenShot]

APPPEND

, VS ( VS Target Framework) TableAdapter .

, , . .

, - Visual Studio, ESPECIALLY, VS2003, VS2005, , VS2010 ( ).

, VS2003 VS2005, . ........ , .

" " . " " ( .sln)... " " , .

.

0

All Articles