Saturday, February 25, 2012

query builder

hi friends
i've one question is it possible to use SMO to replicate "Query Designer" programmatically?
i want to write a query builder for end users and am wondering which objects in SMO i need to use to achieve what i want.
any ideas on this one much appreciated.
Thank you very much for your help.You can use SMO for part of the problem, but not all. You can use SMO to obtain a listing of tables, columns, and views and various properties (e.g. keys, datatypes, and etc). But this is no way in SMO to provide it some tables and conditional statements to generate a query.

Peter|||Yes Peter ,i was able to gather table,columns info from SMO but did not see any class inside this namespace to generate query .
do you have any other ideas/advise in writing a sql engine?
Thanks for your help.|||Sorry, I don't have any other suggestions.

Peter|||SMO will be helpful for you in obtaining metadata of the objects (tables, colums, foreign keys etc.) which will help you building the queries. However the query building portion is something you need to build yourself. SMO will not help you in any way.|||

Thanks for the reply Michiel.

finally we ended up using Report builder that ships with sql reporting services.

No comments:

Post a Comment