Generate DataSet rename tables

  • Thread starter ASP.Net programmer
  • Start date
A

ASP.Net programmer

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
 
A

ASP.Net programmer

I found it. I could change the DataSet table name from the table mappings
collection. :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,074
Latest member
StanleyFra

Latest Threads

Top