Print Page | Close Window

Question on using Linked Servers with OQL

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce Classic
Forum Discription: For .NET 2.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=241
Printed Date: 11-Jan-2026 at 7:37pm


Topic: Question on using Linked Servers with OQL
Posted By: Customer
Subject: Question on using Linked Servers with OQL
Date Posted: 12-Jul-2007 at 5:39pm

I’m currently familiarizing myself to study further on improving our ways on using IdeaBlade Persistence in our application in order to make it more efficient and effective towards our application.

Just a quick question. How does IdeaBlade handle querying of data in multiple databases using linked servers and OQL? Is it possible to use the EntityQuery or RdbQuery commands rather than always Pass-thru statements?

Paul replied:




Replies:
Posted By: IdeaBlade
Date Posted: 12-Jul-2007 at 5:39pm
The short answer to your question is tht OQL cannot query linked servers.  The longer answer is that a DevForce application can operate across multiple databases and servers including servers from different vendors.  Among other things, relations can be defined that span entities generated from different servers/databases etc.  Taking an example derived from our IdeaBladeTutorial sample database, I can have a Customer class that is generated from a table on one database/server and an OrderSummary class that is generated on another.  I can define a relation between them such that, for example, given an instance of a Customer entity MyCustomer, the code

EntityList<OrderSummary> MyCustomersOrders = MyCustomer.OrderSummaries; 

will return a list of orders for that customer without caring that this data resides on different databases. 

If you can be more specific in what you want to do we can tell you how to do it in DevForce in greater detail.  In many cases we get questions from customers who are accustomed to describing what they want in "database-centric" terms.  In many cases we can help them accomplish what they want to do more easily in DevForce than what they are accustomed to, once we understand what their requirements are.

If you have a specific task in mind let us know what it is and we will try to be of help.



Posted By: Customer
Date Posted: 12-Jul-2007 at 5:45pm

Thanks a lot for this.

The following are my follow-up concerns: 

·         We have tried out querying linked servers using pass thru statements, but we encountered a timeout expired exception when querying 20,000+ records. (See attached image) Is this a limitation for using pass thru’s?  

·         As for your response on my question, will it perform faster if we use OQL with entity graphs relations from one db server to another, or use a pass thru statements with linked servers? An example of our pass thru implementation is the GeneratePAYE_SITEReport.txt attached file.

 




Print Page | Close Window