Welcome :Guest
Congratulations!!!

Top 5 Contributors of the Month
Jayakumar

### Export Visio Database Table Names to Excel

If you use the Enterprise Architect edition of Microsoft Visio for data modeling regularly, then there is a good chance that at some point you've wanted to export just the table names into Excel. You might want to do this to map logical ERD entities to physical data model tables, track project status by entity, or track overlap between database versions.

### merging multiple tables in a single dataset to single table

i have a stored procedure which returns three tables to a dataset ..... now i need to merge all three tables to a single table from d same dataset

like dataset1 has table1 table2 and table3 .... i want all the three tabels to be merged into dataset1 itself .... instead of three diffrent tables so that i can show all three table data in a single datagrid  as a compact data and combination of 3 tables from d single dataset.....

### SQLCE table column DefaultValues don't show up in XSD Dataset designer

Using Visual Studio 2008 with SQL CE 3.5, I notice that default values in the creation scripts for the database tables are not reflected in the dataset designer XSD file.ÃÂ  For example, the following SQL script creates the non-nullable table column names "Content" with a default value of 'Image':ÃÂ ÃÂ ÃÂ ÃÂ "Content" nchar(20) NOT NULL DEFAULT 'Image',But in the column properties of the dataset designer (XSD) panel, this column correctly shows up as non-nullable, but with a DBnull default value as follows: ÃÂ ÃÂ ÃÂ ÃÂ Name: ContentÃÂ ÃÂ ÃÂ ÃÂ Allow DBnull: FalseÃÂ ÃÂ ÃÂ ÃÂ DefaultValue: <DBnull>Am I missing something somewhere, or is this a VS bug?ÃÂ  Also, how do I get the XSD file to regenerate after schema changes in the database?ÃÂ  Sqlmetal doesn't do it.Thanks,ÃÂ ÃÂ ÃÂ ÃÂ -BGood

### C#: How to add a row to a child table with a DataSet backing?

On the back end I am using XML files, xsd schemas a DataSet(dsThingPrograms) and DataTables. I have a parent ->child table relationship defined through the DataSet designer as such:   things[RFID(pkey), name] programs[ID(pkey/autogen), name, path, thing_RFID(FK references things->RFID)]   In my code I have:   dsThingPrograms.things.AddthingsRow("lala" , "00ffe4" ); dsThingPrograms.things.WriteXml("path\to\things.xml" , System.Data.XmlWriteMode.WriteSchema);   which works fine. However the problem comes when I try to add a row to the Programs table. When I do:   dsThingPrograms.programs.AddprogramsRow("someprog" , "some\path" , <???>);   VS wants me to add a "dsThingPrograms.thingsRow parentthingsRowByFK_things_programs" where the <???> is. I've tried a bunch of things but I could not satisfy that requirement and can't even get the code to compile. What is supposed to go in there to satisfy the FK property?

### setting schema as dataset to a table

hiii have an already existing schema (in a xsd file). now i need to prepare a report, so in the rdlc page i take a table. now how can i set the schema as a dataset to the table?(i'm getting an error -- "the table 'table1' is in the report body but the report has no data set.  Data regions are not allowed in reports without datasets.").

### Its posible to do a select without the table and the column names into a stored procedure?

Hello!!

I need your help. Imagine that I have two tables:

1. ALUMN wich has three columns: IdAlumn, Name and Address.
2. SPORT wich has columns: IdSport, Name, Players and Description.

Supose that my tables could be differnced by a number 1 is for ALUMN and 2 is for SPORT.

And the columns of each table too. So 1 is for IdAlumn, 2 is for Name and 3 is for Address. 1 is for IdSport, 2 is for Name 3 is for Players and 4 is for Description.

For example the combination of table 2 and column 3 is SPORT-Players.

Then I want to do an stored procedure that receives two parameters (the table, the column) @tab and&

### Arrange columns from nested table in a dataset that writes into XML file

Hi

I have 3 related data tables. I added these tables into a dataset and finally write it to a XML file. But the related columns from table 2 and 3 is appended after all the columns from table 1. How can I have something like:
table1->col1
table1->col2
table2->col1
table1->col3
table3->col1
in a dataset that I write to XML instead of
table1->col1
table1->col2
table1->col3
table2->col1
table3->col1

hi

how i can disable generation of insert update delete select commands in tableadapter or how i can

remove all of these commands in dataset?

### Update a table from a dataset

Hello,

I have a data flow task in which I have a dataset containing some rows and now I want to update the rows in a table, not insert them. Is there any way to do that in the task?

Thanks.

### How to get Default value in table to work when NULL in DataSet

Is this possible? If the parameter value is NULL in DataSet, the default value is not assigned.

### Multiple Dataset in one table

Hi All,

I have one table with three column say

A,B,C

where A is Metrics column ,B having sum (Metrics) of one day ,C having sum(metrics) of 2 days as below

Metrics                          1 day                                             2 day

A                      12 (Value of Column B)           67 (Value of Column C)

B and C will come from different dataset,kindly sugest how to do this,i have to retreive data on the basis of Metrics.

Amit

### Creating Table from DataSet

Hello all,

Real simple one here.  I'd like to create a table on my Page from a DataSet.  It looks like I have it working properly, but what I'd like to do is interpret the columns, as well as be selective with which column to display.

            Dim dc As DataColumn
Dim dr As DataRow

For Each dr In ds.Tables(0).Rows

Dim trow As New TableRow

For Each dc In ds.Tables(0).Columns

Dim tcell As New TableCell

Next

Next

I would like specific columns, by name or position doesnt matter.

So if a column is = named column, then addcell

and also, the data needs to be interpreted: If value of column = x then response.write("y")

In sum, I dont want all the columns, just specific ones, then I was to interpret whats in that cell, and write something.

For Each dc In ds.Tables(0).Columns


### Re:Table Names with specified columns

Hi All,

I have a column called createdate in my DBtables.

I want a query which pull me all the tables in DB which has this column name and if the column name doesnt present it has to return null

the o/p shd be like this

tablename  columnname

table1             createdate

table2             createdate

table3             null

table4             createdate

table5             null

Thanks

### How to add cells to html table from dataset

I'm trying to code an html table dynamically, adding the data from a dataset - -

(by the way, the output is on a mobile device)

I keep getting an error:
Multiple controls with the same ID 'tcell0' were found. FindControl requires that controls have unique IDs.

Here's the code (including what I've tried - commented out):

  Dim i As Integer

' For Each dc In ds.Tables(0).Columns

For i = 0 To ds.Tables(0).Columns.Count - 1

Dim tcell As New HtmlTableCell

tcell.ID = "tcell" & i.ToString

tcell.InnerText = dr(i).ToString() & "-" & tcell.ID

'tcell.ID = "tcell" & i.ToString

'i += 1

Next

tblResults.Rows.Add(trow)

if I don't add the cell.id, all the text gets added to t

### Create a XML file from Database table using Dataset

HI,

I've got a SQL database with a table named contact with different column such Name, Address, email ...

I would like to generate a XML file based on the table data:

<contact>

<name> John</name>

...

</contact>

After some research it looks like I can use a dataset from that table to create my xml.

Being a beginner I cannot find the right steps / syntax to do so.

Is there any tutorial showing how to work with dataset and XLM?

### Dataset has one field, populate a table 2 columns wide n rows deep

Hello,

A dataset returns a single field of child names, instead of presenting this as a single column table, I would like it to be multi column.

Dataset returns:

Child1
Child2
Child3
Child4
Child5

I would like to display it as:

Child1 Child2
Child3 Child4
Child5

### Take out spaces from table names

How would you take spaces out of a table names?  I imported tables from Access which all tables had spaces in their names.  I started out with this:

SELECT 'exec sp_rename' +SPACE(1) + '[' + NAME + ']' + ',' + ''
FROM sysobjects
WHERE xtype = 'U'

but im not sure how to get the spaces out or replace the spaces with _

 Categories:
 ASP.Net Windows Application .NET Framework C# VB.Net ADO.Net Sql Server SharePoint Silverlight Others All