Solved

Create a dynamic table in ASP.net

Posted on 2006-07-13
9
193 Views
Last Modified: 2008-01-09
Hi,
I need to create a table that in Asp.net 1.1, that will have 2 colunn and X amount of rows.
I need this table to be fill from my database, and it many have one item to display or 8,9,... to display.
how can I do this in a place holder.
0
Comment
Question by:daze10
9 Comments
 
LVL 75

Expert Comment

by:Aneesh Retnakaran
ID: 17098870
daze10,
> I need to create a table that in Asp.net 1.1, that will have 2 colunn
> and X amount of rows.

You can create  it at the back end , using the CREATE table statement

CREATE TABLE tableName (
urcolumn1 varchar(100)
,urColumn2 varchar(100) )
Go

in order to insert use the insert statement

INSERT INTO tablename
SELECT value1, Value2


B/w i am still confused , why you need to create it at the front end side

0
 
LVL 23

Expert Comment

by:Racim BOUDJAKDJI
ID: 17099099
Just keep in mind that a SQL Table is not RAM.  All its accesses are made on disk.
0
 
LVL 23

Expert Comment

by:Racim BOUDJAKDJI
ID: 17099114
In fact, I suggest you use datasets to create your table instead of SQL table...
0
Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

 

Author Comment

by:daze10
ID: 17099580
the database X number of enters and this enter I need to display in the table in 2 columms and X numbers of rows. What would be the statment that to create a dynamic table in asp.net to get the information from the database.

I have created the sqlconnection, dataset, and the sqlDataAdapter created
then in the design layout I have add the tap for a Plase holder and in it I have placed the table for in to be X size.
now at the other page I have  declared the a values
values for the datarow, number of row, number of cells, ...

But how can I tell the table to go to the database look to see if there is a value in the database then to get one value and place it in the table and then to look at the database once more and if there is a other value to get it and place it in a other colunn and thengo back to the database look once more to add a new row if there is info to add then comtinue on.

how can I do so thing like this
0
 

Author Comment

by:daze10
ID: 17099761
SORRY ITS NOT A PLACE HOLDER ITS A   PANEL
0
 
LVL 29

Accepted Solution

by:
Gautham Janardhan earned 250 total points
ID: 17115351
u have already used the adapter right then u could use the adpater.fill(dataset) option to fill the dataset

u could alter the adpater.selectciommand to provide a custom select


if u want to update that table back to db u must also write adapter.insercommand and other commands
0
 
LVL 23

Assisted Solution

by:Racim BOUDJAKDJI
Racim BOUDJAKDJI earned 250 total points
ID: 17116988
Keep in mind that tables in a dataset do *not* have to have a corresponding SQL table in server side.  The main advantage is that they are pure RAM representations with filter capabilities.
0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
MS SQL with ODBC 5 36
Find results from sql within a time span 11 32
Help in Bulk Insert 9 35
Present Absent from working date rage 11 21
Let's review the features of new SQL Server 2012 (Denali CTP3). It listed as below: PERCENT_RANK(): PERCENT_RANK() function will returns the percentage value of rank of the values among its group. PERCENT_RANK() function value always in be…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Via a live example, show how to backup a database, simulate a failure backup the tail of the database transaction log and perform the restore.
Viewers will learn how the fundamental information of how to create a table.

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question