1

I have a repeater table in an asp.net application bound to an asp:SqlDataSource, and I need that data source's SelectCommand to select data from two databases in different servers.

I've been using the ConnectionString property of SqlDataSource to establish a connection to a single server, but I'm unsure of how to establish a link to multiple servers. Is this possible?

2
  • this is a little confusing. please provide what you're trying to do exactly, with code parts, database tables etc. Commented Oct 23, 2014 at 14:52
  • I haven't tested/tried so see if this works. The idea is that your db query does the extra connection and action (your sqldatasource will still just need one conn). Again, haven't tried. You can help the community by posting result if successful. Hth... Commented Oct 23, 2014 at 15:24

1 Answer 1

4

SqlDataSource has one ConnectionString

Two connectionStrings are needed. Make queries using each one and combine, sort or process the result in the code and then use the result for the data source of the table.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.