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?

Santosh Panda
  • 7,235
  • 8
  • 43
  • 56
JaGo
  • 257
  • 1
  • 4
  • 12
  • this is a little confusing. please provide what you're trying to do exactly, with code parts, database tables etc. – İsmet Alkan Oct 23 '14 at 14:52
  • I haven't tested/tried so [see if this works](http://stackoverflow.com/q/4091960/304683). 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... – EdSF Oct 23 '14 at 15:24

1 Answers1

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.

Nader Khazai
  • 185
  • 6