473,320 Members | 1,766 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.

Table created dinamically and dataGridView

Hello!

In my windows form i have to create table (at runtime) of specified by the user name (in textbox) and then use this table as datasource of dataGridView. Finally, filled table must be inserted into database. I tried to solve this problem in two ways:

1)I have created dataTable, specified its columns etc. but I couldn't insert dataTable into database, even using SqlDataAdapter.Update() - propably I misused dataAdapter. I'm working with C# for 1 week and I don't fully understand idea of datasets, tableadapters etc. ;)

So I decided to use SQL commands:

2)Using ExecuteNonQuery() I've created table in my database, then I recognized, that I have to use magic SqlDataAdapter and i gave up....

I want to manage content of DataGridView in the same way, as in the case of datatable added to dataset using configuration wizard.

I know, that I can skip dataGridView, create list of textboxes, button expanding this list, and funcion inserting all fields into my table after confirmation button, but my supervisor expects dataGridView...

I can't paste the code here, because I left only copy of sourcecode on company computer. If it will be necessary I will paste here my code tomorrow.

Thank You for any help!
Sep 3 '12 #1
0 1666

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

Similar topics

4
by: John | last post by:
Is there anyway to refer to an object's (e.g., a table) created date in VB? The reason is I need to see the data set's "date effective", which for me would be the date the table was created. I...
1
by: Andy | last post by:
Any one knows how to walk or in other words print all the key/value pairs in a hash table created by hcreate_r()? I have added the elements of the hash table using the function hsearch_r(). I am...
0
by: Leonardo Gangemi | last post by:
How to align right a table based on another table created dinamically? Leonardo
4
by: Cesar Ronchese | last post by:
Hello. I have a WebForm that contains a Panel object. This panel, at design time is empty. When running, I need to create dinamically a Label and a WebControl (built from the same project). I...
19
by: Lyle Fairfield | last post by:
MSDN Home > MSDN Library > Win32 and COM Development Data Access Microsoft offers many data access technologies to suit various development needs. This section of the MSDN Library contains...
0
by: jpapanestor | last post by:
Newbie Question: I have been following along in a GREAT tutorial (http://msdn.microsoft.com/vstudio/express/vwd/learning/) and now I am stuck. I have created a table and want to add data to...
6
by: Ros_Au | last post by:
I create a table dynamically using VB, How do I get HTML code for that table into a string variable ??? any sugestion, Thanks!!!
7
by: learning | last post by:
Hi! Here's my situation: I created a temporary table TEMP1 in PAGE1.PHP and inserted a few rows. Before I left PAGE1.PHP i tried "SELECT * FROM TEMP1" and echoed the rows and surely there they...
7
by: ssknov | last post by:
hi i need to populate a DatagridView1 with a single column values of a table. I tried like this. Dataset ds=new dataset(); my dataset ds retrieves and filles a single column from a table. ...
4
by: thelner | last post by:
Im trying to bind a table in mysql containing a mysql date field in a datagridview in vb.net 05. When i only select fields containing non-dates it works, but once i add a date field it generates this...
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
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...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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.