Guru question - at least I think so: Generate SELECT from dataset

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am constructing a dataset in memory from one or multiple tables with some
links between them. I use existing tables from my database and user can
select any combination of them to create his own data source.
It is like when you create a view in SQL Server and it creates SQL SELECT
statement for you.

My question is:

Can ADO.NET somehow help me to create/generate SQL SELECT statement based on
constructed dataset?

Thank you.
Victor
 
Can ADO.NET somehow help me to create/generate SQL SELECT statement based
on
constructed dataset?

A dataset is completely disconnected from the database - it's got nothing to
do with a specific database - therefore a dataset in itself cannot help you
create a databse specific SQL statement.

The closest approximation of what you need is the CommandBuilder object.

- Sahil Malik
http://codebetter.com/blogs/sahil.malik/
 
Victor,

Unfortunately, there is no feature in ADO.NET that would help you
generate a SELECT query based on the contents or schema in a DataSet.

David Sceppa
Microsoft
This posting is provided "AS IS" with no warranties,
and confers no rights. You assume all risk for your use.
© 2005 Microsoft Corporation. All rights reserved.
 
Victor,

Not to the best of my knowledge.

David Sceppa
Microsoft
This posting is provided "AS IS" with no warranties,
and confers no rights. You assume all risk for your use.
© 2005 Microsoft Corporation. All rights reserved.
 
Thank you David again.

Maybe you or anybody else knows any component, method, library, etc. to do
such or similar stuff?

Victor
 
Not really. An SQL SELECT requires a SQL engine of some kind like JET or SQL
Server or MySQL or Oracle. ADO.NET (and ADO classic and their predecessors)
are simply interfaces to remote or local DBMS engines that do all the
work--like SELECT.

hth

--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
 
Bill, I really appreciate that you replied. You are a real expert in my eyes.

Is there any way to do that remotely from client machine, assuming that I
have SQL Server somewhere on the network.

I need this stuff for my application where user is creating his own report.
I generate RDL file and use SQL Reporting Services to render report. So my
user should be able to create his own data source by taking tables and
linking them.

Thanks again.

Victor
 
Back
Top