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

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

Sahil
Sat Feb 19 02:09:28 CST 2005

> 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" <Victor@discussions.microsoft.com> wrote in message
news:329E59F0-FD5D-4F28-BCA8-5079A80B0991@microsoft.com...
>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
>



Re: Guru question - at least I think so: Generate SELECT from data by Victor

Victor
Mon Feb 21 07:55:12 CST 2005

CommandBuilder doesn't generate SELECT statement.

Anyway, thanks.
Victor


"Sahil Malik" wrote:

> > 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" <Victor@discussions.microsoft.com> wrote in message
> news:329E59F0-FD5D-4F28-BCA8-5079A80B0991@microsoft.com...
> >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
> >
>
>
>

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

davidsc
Wed Mar 02 15:47:11 CST 2005

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.


RE: Guru question - at least I think so: Generate SELECT from data by Victor

Victor
Wed Mar 02 16:01:26 CST 2005

Thank you David.

Any other Microsoft tool can generate SELECT at run time?

Victor


"David Sceppa" wrote:

> 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.
>
>

RE: Guru question - at least I think so: Generate SELECT from data by davidsc

davidsc
Wed Mar 02 16:53:15 CST 2005

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.


RE: Guru question - at least I think so: Generate SELECT from data by Victor

Victor
Wed Mar 02 17:01:04 CST 2005

Thank you David again.

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

Victor


"David Sceppa" wrote:

> 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.
>
>

Re: Guru question - at least I think so: Generate SELECT from data by William

William
Wed Mar 02 17:04:11 CST 2005

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.
__________________________________

"Victor" <Victor@discussions.microsoft.com> wrote in message
news:FA53EBD0-E27F-4953-AB4A-14E9D962EB4B@microsoft.com...
> Thank you David.
>
> Any other Microsoft tool can generate SELECT at run time?
>
> Victor
>
>
> "David Sceppa" wrote:
>
>> 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.
>>
>>



Re: Guru question - at least I think so: Generate SELECT from data by Victor

Victor
Wed Mar 02 17:17:04 CST 2005

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


"William (Bill) Vaughn" wrote:

> 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.
> __________________________________
>
> "Victor" <Victor@discussions.microsoft.com> wrote in message
> news:FA53EBD0-E27F-4953-AB4A-14E9D962EB4B@microsoft.com...
> > Thank you David.
> >
> > Any other Microsoft tool can generate SELECT at run time?
> >
> > Victor
> >
> >
> > "David Sceppa" wrote:
> >
> >> 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.
> >>
> >>
>
>
>

Re: Guru question - at least I think so: Generate SELECT from data by Sahil

Sahil
Fri Mar 04 21:37:44 CST 2005

Victor,

Will a SQL Query designer - similar to the one seen in MS Access work for
you? If so, it is possible to hook that UI upto any d/b.

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


"Victor" <Victor@discussions.microsoft.com> wrote in message
news:7B9F3BB8-3332-4CF8-B00B-9A9BA9B66A01@microsoft.com...
> Thank you David again.
>
> Maybe you or anybody else knows any component, method, library, etc. to do
> such or similar stuff?
>
> Victor
>
>
> "David Sceppa" wrote:
>
>> 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.
>>
>>