By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,904 Members | 1,439 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,904 IT Pros & Developers. It's quick & easy.

Generate DataSet rename tables

P: n/a
I have a few SQLDataAdapters which select a MAX() value from a few
different tables.

Here is a sample of the SQL statement:
SELECT MAX(startdate) AS startdate
FROM some_table1
WHERE (startdate <= GETDATE())

The problem I have is this: When I select a few of those SQLDataAdapters
to generate a DataSet from them the list of DataAdapters shows:

Table (daSomeTable1)
Table (daSomeTable2)

Other (normally selected) tables show up in the list like this:
AnotherTable (daAnotherTable)

If I add the daSomeTable* DataAdapters I get the following error:
"Cannot generate a dataset that contains multiple tables with the same
name (Table)."

Changing the SQL statement to the following code didn't work:
SELECT MAX(startdate) AS startdate
FROM some_table1 AS some_table1
WHERE (startdate <= GETDATE())

Does someone have the solution to this problem? I prefer to put all
those DataAdapters in one DataSet, if possible.

Thanks in advance
Nov 19 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
I found it. I could change the DataSet table name from the table mappings
collection. :)

"ASP.Net programmer" <me@none.com> wrote in news:42a02d1e$0$29627
$e*******@news.xs4all.nl:
I have a few SQLDataAdapters which select a MAX() value from a few
different tables.

Here is a sample of the SQL statement:
SELECT MAX(startdate) AS startdate
FROM some_table1
WHERE (startdate <= GETDATE())

The problem I have is this: When I select a few of those SQLDataAdapters to generate a DataSet from them the list of DataAdapters shows:

Table (daSomeTable1)
Table (daSomeTable2)

Other (normally selected) tables show up in the list like this:
AnotherTable (daAnotherTable)

If I add the daSomeTable* DataAdapters I get the following error:
"Cannot generate a dataset that contains multiple tables with the same
name (Table)."

Changing the SQL statement to the following code didn't work:
SELECT MAX(startdate) AS startdate
FROM some_table1 AS some_table1
WHERE (startdate <= GETDATE())

Does someone have the solution to this problem? I prefer to put all
those DataAdapters in one DataSet, if possible.

Thanks in advance


Nov 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.