473,396 Members | 1,927 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Creating tables in dynamically in web developer 2008?

plz help me that how can i create tables in database using web developer?
Actually i want to make tables dynamically whenever new user registers to my website. I`v created the first part using asp.net builtin database feature. I am able to enter new users info in my table but want to create another table specially for tht user!
Oct 2 '08 #1
4 947
jhardman
3,406 Expert 2GB
The most obvious way to do it would be to pass a "create table" via SQL. Have you ever done anything like that before?

Jared

BTW, I've moved you over to the .NET forum. The ASP forum is for "classic" ASP, not ASP.NET
Oct 3 '08 #2
l034n
15
Expand|Select|Wrap|Line Numbers
  1. private DataTable GetSimpleDataTable()
  2.             {
  3.                 DataTable dt = new DataTable("MyTable");
  4.                 dt.Columns.AddRange(new DataColumn[] { new DataColumn("Column1"), new DataColumn("Column2") });
  5.                 dt.Rows.Add(new string[] { "Row1Col1", "Row1Col2" });
  6.                 dt.Rows.Add(new string[] { "Row2Col1", "Row2Col2" });
  7.                 dt.Rows.Add(new string[] { "Row3Col1", "Row3Col2" });
  8.                 return dt;
  9.             }
That way you have in-memory data table and you may use it for whatever you want.
Cheers
Oct 3 '08 #3
jhardman
3,406 Expert 2GB
That's a good solution, then if you wanted to put it in the db when done, you can just use an adapter.

Jared
Oct 3 '08 #4
Curtis Rutland
3,256 Expert 2GB
Do you think that it is wise to create another table for each user? perhaps you should use one table that relates to another with the userid being the key.
Oct 3 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Billy Cormic | last post by:
Hello, I am interested in dynamically creating temp tables using a variable in MS SQL Server 2000. For example: DECLARE @l_personsUID int select @l_personsUID = 9842
6
by: Tex | last post by:
I am writting a survey system web application. I am using ASP.Net 2, C# and MS SQL 2005. I am able to store surveys and questions associated to the surveys just fine. The problem I am having is...
6
by: RSH | last post by:
Hi, i have a situation where I need to dynamically create objects in a loop. My question surrounds intantiation naming in such a scenerio. Below is a snippet that is basically hardcoding each...
9
by: Tarscher | last post by:
hi all, I have this seemingly simple problem. I have lost a lot of time on it though. When a user selects a value from a dropdownlist (static control) a dynamic control is generated. I have...
0
by: lianaent | last post by:
Hi All, I'm brand new to asp.net 2.0, and have a simple task of just creating a quick and dirty data entry form with SQL Server 2005 on the back end. I added a gridview to my form, and I can...
4
by: mohaaron | last post by:
I can think of a lot of reasons why this might need to be done but as far as I can tell it's not possible. I've been looking for a way to add HtmlTableRows to a table using a button click for a...
0
by: Syoam4ka | last post by:
My project is about jewellery. I have devided my jewelery into main types, which each one of them has sub types, and each one those sub types has the jewellery. I have a tabcontainer. It includes...
4
by: Craig Buchanan | last post by:
I dynamically add data-bound templates to a gridview in my ascx control. while this works correctly when the gridview is databound to the datatable, i'm having issues on postback. i would like...
15
by: Peter | last post by:
I have the following web page and I am trying to have the Field lables NOT to wrap. It looks fine in a designer but when I run the program in a browser the lables that have a space wrap. How do I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.