Quote:
I can't solve this problem. Can somebody help? IDNo is number, others are text in access database.
Nobody can help you because of the way you put values in your query.
OleDbCommand guncellekomutu1 = new OleDbCommand("update Malzemeler set ComponentNo='" + TxtParcaNumarasi.Text + "',Producer='" + TxtUretici.Text + "',ShelfNo='" + TxtRafNo.Text + "',BoxNo='" + TxtKutuNumarasi.Text + "',Piece='" + TxtAdet.Text + "',ProductName='" + TxtMalzemeAdi.Text + "',SerialNo='" + TxtSeriNo.Text + "',TAINo='" + TxtTAINo.Text + "',Barcode='" + TxtBarkod.Text + "',Depositary='" + TxtZimmet.Text + "',UploadDate='" + dateTimePicker1.Text + "',LastUpdateDate='" + dateTimePicker2.Text + "',LastUpdatedPerson='" + label12.Text + "',Note='" + txtnot.Text + "' where IDNo=@IDNo", baglanti);
Never build an SQL query by concatenating strings. Sooner or later, you will do it with user inputs, and this opens door to a vulnerability named "SQL injection", it is dangerous for your database and error prone.
A single quote in a name and your program crash. If a user input a name like "Brian O'Conner" can crash your app, it is an SQL injection vulnerability, and the crash is the least of the problems, a malicious user input and it is promoted to SQL commands with all credentials.
SQL injection - Wikipedia[
^]
SQL Injection[
^]
SQL Injection Attacks by Example[
^]
PHP: SQL Injection - Manual[
^]
SQL Injection Prevention Cheat Sheet - OWASP[
^]
How can I explain SQL injection without technical jargon? - Information Security Stack Exchange[
^]