المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : Make a sql query object by C#.



C# Programming
12-15-2011, 01:11 PM
I want to analyse the Sql Syntax,
and divide the Sql string in to different parts,
like "selected columns part","selected tables part","where part"

and build classes for these parts,

For Example:
Select CompanyName from Companys

"CompanyName" is the "Selected Column" part;
"Company" is the "Selected Table" part;

Then put these parts into Orient-object classes;


The problem I met is that:
How can I anlyse the syntax of "Sql Query",and sperated them in to different parts?


Best wishes;