Trata de hacer las concatenaciones de los string de esta forma:
Delete:
string.Format("DELETE FROM proveedor WHERE cod_proveedor = '{0}'", txt_codigo.Text)
Update:
String.Format("UPDATE proveedor SET nom_proveedor='{0}', rut_proveedor='{1}', contacto='{2}', teléfono={3} WHERE cod_proveedor='{4}' ", txt_nombre.Text, txt_rut.Text, txt_contacto.Text, txt_telefono.Text, txt_codigo.Text)
Asegurate que los valores que envías, sean del tipo de datos que acepta la tabla en base de datos.
La forma correcta de manejar los datos tal cual como tu lo quieres hacer, Microsoft recomiendo la siguiente forma:
Public Function CreateCustomerAdapter(ByVal connection As SqlConnection) As SqlDataAdapter
Dim adapter As SqlDataAdapter = New SqlDataAdapter()
' Create the SelectCommand.
Dim command As SqlCommand = New SqlCommand( _
"SELECT * FROM Customers " & _
"WHERE Country = @Country AND City = @City", connection)
' Add the parameters for the SelectCommand.
command.Parameters.Add("@Country", SqlDbType.NVarChar, 15)
command.Parameters.Add("@City", SqlDbType.NVarChar, 15)
adapter.SelectCommand = command
' Create the InsertCommand.
command = New SqlCommand( _
"INSERT INTO Customers (CustomerID, CompanyName) " & _
"VALUES (@CustomerID, @CompanyName)", connection)
' Add the parameters for the InsertCommand.
command.Parameters.Add("@CustomerID", SqlDbType.NChar, 5, "CustomerID")
command.Parameters.Add("@CompanyName", SqlDbType.NVarChar, 40, "CompanyName")
adapter.InsertCommand = command
' Create the UpdateCommand.
command = New SqlCommand( _
"UPDATE Customers SET CustomerID = @CustomerID, CompanyName = @CompanyName " & _
"WHERE CustomerID = @oldCustomerID", connection)
' Add the parameters for the UpdateCommand.
command.Parameters.Add("@CustomerID", SqlDbType.NChar, 5, "CustomerID")
command.Parameters.Add("@CompanyName", SqlDbType.NVarChar, 40, "CompanyName")
Dim parameter As SqlParameter = command.Parameters.Add( _
"@oldCustomerID", SqlDbType.NChar, 5, "CustomerID")
parameter.SourceVersion = DataRowVersion.Original
adapter.UpdateCommand = command
' Create the DeleteCommand.
command = New SqlCommand( _
"DELETE FROM Customers WHERE CustomerID = @CustomerID", connection)
' Add the parameters for the DeleteCommand.
command.Parameters.Add( _
"@CustomerID", SqlDbType.NChar, 5, "CustomerID")
parameter.SourceVersion = DataRowVersion.Original
adapter.DeleteCommand = command
Return adapter
End FunctionFuente: http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqldataadapter.updatecommand
Salu2,
ME