Custom Table Field

Kelly Shepard asked on May 14, 2018 19:14

Is it possible to have a query on a custom table field that selects data from an external source?

Recent Answers

Peter Mogilnitski answered on May 14, 2018 21:22 (last edited on May 14, 2018 21:33)

When you say custom table - you don't mean custom table in Kentico sense ?

With Kentico custom tables it is not possible because a custom table must be located in Kentico DB. You can do it with modules: module custom table can point in an external DB, you just need to specify an external connection string in web.config. When you define module classes and you need to use connection string for external DB in your module class :).

Another way is to use SQL Data Source Web part and point to a SQL server your want. This is an easier way and you don't have module complexity.

0 votesVote for this answer Mark as a Correct answer

Brenden Kehren answered on May 14, 2018 21:39

Typically what I do in this case is create a custom query in that custom table object. From there I'll make my reference to the linked database or database on the SAME server. Keep in mind the database user who is connected to the Kencito database will also need to have SELECT permissions to the other database you are querying from.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.