No you wont need any sql code because you should have already put all the information into the dgv. You are just getting the code from the dgv instead. Just remember to put the name of the form everytime you use datagridview1 otherwise it wont know which dgv you are refering to.