473,320 Members | 2,117 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,320 software developers and data experts.

Temp Table and Add row and column in this table

Hai,
I want to make a temp table in vs 2005. i have few field in one form and a datagridview. i want to make a temp table where i can store my different data in the controls(textbox, combo box) data as a row of the temp table and the datasource of datagrid view will be the temp table. again when i will enter different data in the controls(textbox, combo box) then i will press button add_data then the data will add the temp table as another row that means there will 2 row and the gridview will show this datas in two row accordingly. how can i make a temp table without database.

please help me...
Feb 25 '08 #1
4 1762
Plater
7,872 Expert 4TB
With the DataTable object.
Expand|Select|Wrap|Line Numbers
  1. DataTable dt = new DataTable();
  2. dt.Columns.Add("MyColumnName1");
  3. dt.Columns.Add("MyColumnName2");
  4. dt.Columns.Add("MyColumnName3");
  5. //now you have a datatable with 3 columns in it.
  6.  
Check MSDN for more information.
Feb 25 '08 #2
With the DataTable object.
Expand|Select|Wrap|Line Numbers
  1. DataTable dt = new DataTable();
  2. dt.Columns.Add("MyColumnName1");
  3. dt.Columns.Add("MyColumnName2");
  4. dt.Columns.Add("MyColumnName3");
  5. //now you have a datatable with 3 columns in it.
  6.  
Check MSDN for more information.


Hello sir..
This is for column purpose in a datatable but how can i add new row in this table.
I have 3 control txt_ID, txt_Name, cmb_Group. Now i want that i will put data on three control and when i click on add item button then this data will enter into the temp data table and those control will vacant. Then i again enter new data on those three control then again there will be new row in the temp table. So please help me....
Feb 26 '08 #3
Hai,
I want to make a temp table in vs 2005. i have few field in one form and a datagridview. i want to make a temp table where i can store my different data in the controls(textbox, combo box) data as a row of the temp table and the datasource of datagrid view will be the temp table. again when i will enter different data in the controls(textbox, combo box) then i will press button add_data then the data will add the temp table as another row that means there will 2 row and the gridview will show this datas in two row accordingly. how can i make a temp table without database.

please help me...
Feb 26 '08 #4
Plater
7,872 Expert 4TB
Check MSDN for more information.
They have in depth explanations of how to add rows


ALSO: Please do not double post your questions, it is against the posting guidelines.

MODERATOR
Feb 26 '08 #5

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

Similar topics

3
by: Rebecca Lovelace | last post by:
For some reason in Enterprise Manager for SQL Server 2000, I cannot put the following line into a trigger: select * into #deleted from deleted When I hit the Apply button I get the following...
1
by: Renae | last post by:
This one is interesting... Is there any way to pass a joined parameter into a UDF as I'm attempting below? I have a temp table that I'm trying to create: create table #t3 ( bmkPerson int...
6
by: pb648174 | last post by:
I have a pivot table implementation, part of which is posted below. It returns no errors in query analyzer, but when profiler is run, it shows that "Error 208" is happening. I looked that up in BOL...
0
by: joe pribele | last post by:
I have this stored procedure that takes some xml as input. What I need to is use xml as a table so that I can join other tables to the xml and get information back that matches the criteria. I...
5
by: Timothy Perrigo | last post by:
This bug? feature? caused a bit of havoc for us yesterday...A reproducible example follows. Essentially, if you have a table with a primary key called "id", and you create a temp table (via a...
1
by: Timothy Perrigo | last post by:
(PostgreSQL 8.0 beta 4 on Mac OS X 10.3.6) I'm working on a function which creates and populates a temporary table, then returns the number of records it has inserted. I'm getting an error,...
5
by: wackyphill | last post by:
If you were doing paging of results on a web page and were interested in grabbing say records 10-20 of a result set. But also wanted to know the total # of records in the result set (so you could...
16
by: pukivruki | last post by:
hi, I wish to create a temporary table who's name is dynamic based on the argument. ALTER PROCEDURE . @PID1 VARCHAR(50), @PID2 VARCHAR(50), @TICKET VARCHAR(20)
4
by: R. K. Wijayaratne | last post by:
Hi everyone, I have a SPROC which selects records into a MSSQL #temp table and then selects the records from that. I drag this SPROC onto the right-hand pane of the DBML diagram, but the method...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.