|
| ||||||||||
| Tags: database, datagridview, search function |
![]() |
| | Thread Tools | Search this Thread |
|
#1
| |||
| |||
| Insert DataGridview into database
|
|
#2
| ||||
| ||||
| Re: Insert DataGridview into database
Office automation is always a tricky business, especially when you wish to take data from Excel and place it into a relational database. Fill the information in the controls in the footer and then click on save button in the footer and bind grid again on click of save button. Not knowing the specifics, I would recommend you look at several things. dgTargeted.DataSource = dsCLISalesBudget.Tables("tblSalesBudgetTarget") do some(CRUD) stuff in your grid. then make your database table look,have,only contain whats inside your grid daCLISalesBudget.Update(dsCLISalesBudget, "tblSalesBudgetTarget") |
|
#3
| |||
| |||
| Re: Insert DataGridview into database
First, Excel interprets data as numeric or string according to its own rules, and will often reveal numeric data as formatted, you you may be better off first placing the information into character fields in SQL Server (in a loading table) then converting to the correct data type there. You can communicate with the database by either a tableAdapter or by using by typing all commands (create a connection, create a command, execute command). |
|
#4
| ||||
| ||||
| Re: Insert DataGridview into database
The most common way of inserting values is by the use of string concatenation. I am able to insert the controls dynamically like text box,combo and checkbutton but i am enable to view the controls. controls r visible when i am click the mouse at that particular grid cell. I am putting some source code line We will concatenate all the values into sql string command and when the concatenation is complete we will have a long string representing all the insertions which can later be send to the command object to be executed. |
![]() |
|
| Thread Tools | Search this Thread |
| |
Similar Threads for: "Insert DataGridview into database" | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| insert into select statement for database | Aidan 12 | Software Development | 5 | 09-03-2010 09:08 PM |
| Unable to update my database using insert command | Govardhann | Software Development | 5 | 13-02-2010 10:10 AM |
| Is it possible to insert value of TextBox into Sql database using C sharp? | Sarfaraj Khan | Software Development | 5 | 05-01-2010 10:58 AM |
| How to update Database with Changes made to the DataGridView | afidelino | Software Development | 3 | 25-09-2009 08:41 AM |
| Insert image in access database from vb 6.0 | Vireshh | Software Development | 2 | 22-01-2009 08:06 PM |