| | |
urgent help required...regarding datagrid viewer
Please support our VB.NET advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Oct 2008
Posts: 5
Reputation:
Solved Threads: 0
Hi.
I am making a project on student attendance register in vb.net2005 with sql2000 server as backend.
I am getting the data at runtime from database in data grid viewer. But if a user wants to edit a record, i want to give rights that he is able to edit only particular column(Like he can edit attendance on particular date but not roll no or name).
I have to submit this project in cllg within few days.
Can someone pls help me with this. How to achieve this.any help will be appreciated.
thx in advance
I am making a project on student attendance register in vb.net2005 with sql2000 server as backend.
I am getting the data at runtime from database in data grid viewer. But if a user wants to edit a record, i want to give rights that he is able to edit only particular column(Like he can edit attendance on particular date but not roll no or name).
I have to submit this project in cllg within few days.
Can someone pls help me with this. How to achieve this.any help will be appreciated.
thx in advance
Last edited by premanjanadas; Apr 19th, 2009 at 11:58 am.
•
•
Join Date: Oct 2008
Posts: 5
Reputation:
Solved Threads: 0
Also, i have 33 columns in my table(Roll no, Name, and 31 dates)
1) Is there any method that i can update my table in backend data base through data gridview. Can y pls provide a code or a link for the same?
2) Even if there is code can it be achieved without using "set" sqlquiery becoz there will be lot of "set" then, and /or no way to know what all column has been changed.
3)Is it possible to create a new table(s) in db automatically at the end of every month.
4) can someone pls help me with how to copy the fields of a table into another table
thx
1) Is there any method that i can update my table in backend data base through data gridview. Can y pls provide a code or a link for the same?
2) Even if there is code can it be achieved without using "set" sqlquiery becoz there will be lot of "set" then, and /or no way to know what all column has been changed.
3)Is it possible to create a new table(s) in db automatically at the end of every month.
4) can someone pls help me with how to copy the fields of a table into another table
thx
•
•
Join Date: Oct 2008
Posts: 5
Reputation:
Solved Threads: 0
Thx for replying.
Also like u mentioned we cant update using set command. Is there any way that in one instruction/coding i can update my database at back end according to whatever changes has been made in data grid viewer. The changes made is unknown to us. it depends on the user and accordingly db can be updated.
Thx in advance.
Also like u mentioned we cant update using set command. Is there any way that in one instruction/coding i can update my database at back end according to whatever changes has been made in data grid viewer. The changes made is unknown to us. it depends on the user and accordingly db can be updated.
Thx in advance.
•
•
Join Date: Nov 2007
Posts: 58
Reputation:
Solved Threads: 2
for that you have to give update button to the user and for update button you can give code as follows
you write this code on update button click event
you write this code on update button click event
VB.NET Syntax (Toggle Plain Text)
this code is for MySql server for i as integer=0 to DataGridView1.Rows.count-1 Dim cmd As MySqlCommand = New MySqlCommand() cmd.Connection = New MySqlConnection(urDatabaseConnectionString) cmd.CommandText = "update yourTableName set yourField1='" & DataGridView1.Rows(i).Cells(1).Value & "', yourField2='" & DataGridView1.Rows(i).Cells(2).Value & "'" cmd.Connection.Open() dr = cmd.ExecuteReader() MessageBox.Show("Record Saved") cmd.Connection.Close() next i
![]() |
Other Threads in the VB.NET Forum
- Previous Thread: Insert icon In ListView Column Header
- Next Thread: vb6 hough transform
| Thread Tools | Search this Thread |
.net 2005 2008 access account arithmetic array arrays basic bing button buttons c# center check checkbox code combobox component convert crystalreport data database datagrid datagridview date dissertation dissertations dropdownlist excel fade file-dialog ftp generatetags google gridview hardcopy images inline input insert intel internet listview mobile monitor ms net networking objects output passingparameters peertopeervideostreaming picturebox picturebox1 plugin port print printing problem problemwithinstallation project remove save searchbox searchvb.net select serial server shutdown soap sorting survey table tcp temperature text textbox timer toolbox trim update updown user validation vb vb.net vb.netcode vb.netformclosing()eventpictureboxmessagebox vb2008 vbnet view visual visualbasic visualbasic.net visualstudio visualstudio2008 web winforms wpf






