[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Create a dynamic table in ASP.net

Posted on 2006-07-13
9
Medium Priority
?
203 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

 

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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Windocks is an independent port of Docker's open source to Windows.   This article introduces the use of SQL Server in containers, with integrated support of SQL Server database cloning.
Via a live example, show how to extract information from SQL Server on Database, Connection and Server properties
Via a live example, show how to setup several different housekeeping processes for a SQL Server.

650 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