Ciao raga,ho un nuovo problema da discutere: nel salvare dei file nel database viene generato un errore "azione eliminata da un oggetto associato"; facendo il debug mi riporta nel codice alla riga che vi segno
e a volte alla riga segnata in blu!codice:Public Sub command1_click() Dim nomefile As String Dim TagCorrente As TagInfo Dim i As Integer If File1.ListIndex < 0 Then MsgBox "selezionare file" Else If Command1.Caption = "Aggiungi" Then For i = 0 To File1.ListCount - 1 If File1.Selected(i) Then Data1.Recordset.AddNew On Error Resume Next nomefile = File1.Path & "\" & File1.List(i) Open nomefile For Binary As #1 With TagCorrente Get #1, FileLen(nomefile) - 127, .Tag If Not .Tag = "TAG" Then Close #1 Exit Sub End If Get #1, , .Canzone Get #1, , .Artista Get #1, , .Album Get #1, , .Genere Close #1 Text1.Text = RTrim(.Canzone) Text3.Text = RTrim(.Artista) Text4.Text = RTrim(.Album) Text5.Text = RTrim(.Genere) End With Label4.Caption = File1.Path Data1.Recordset.Update End If Next i Else Data1.Recordset.CancelUpdate Command1.Caption = "Aggiungi" End If End If End Sub
è problema di permessi?:master:
Come lo risolvo?![]()


Rispondi quotando