codice:
stringa = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="
stringa = stringa & "gissi.mdb"
Set cn = New ADODB.Connection
Set rs = New ADODB.Recordset
cn.Open stringa
rs.Open "SELECT * FROM prodotti", cn, 3, 3
'Scrittura su database
idprodotto = "1"
While rs.EOF = False
If rs("ID") = idprodotto Then
Select Case numerostato
Case 1
If txtcliente.Text = "" Then
rs("cliente") = ""
Else
rs("cliente") = txtcliente.Text
End If
End Select
End If
rs.MoveNext
Wend
Set cn = Nothing
Set rs = Nothing
sto provando e riprovando mi dice..
il campo prodotti.cliente non può contenere una stringa di lunghezza 0
(ho impostato idprodotto a 1 per fare una prova)
quale potrebbe essere il problema?