Aiuto Recupero indici cancellati in tabella
Chiedo Aiuto per recuperare indici in phpmyadmin funziona con questa stringa:
SET @num := 0;
UPDATE clienti SET Id_clienti = @num := (@num+1);
ALTER TABLE clienti AUTO_INCREMENT =1;
DOVREI PASSARLA IN VISUAL BASIC STO UTILIZZANDO QUESTO MODO MA MI DA ERRORE:
Try
dbconn.Open()
Cmd = dbconn.createCommand()
Cmd.CommandType = CommandType.Text
' Esegue la prima query
Cmd.CommandText = "SET @num := 0;"
Cmd.ExecuteNonQuery()
' Esegue la seconda query
Cmd.CommandText = "Update `clienti` SET `Id_clienti` = @num := (@num+1);"
Cmd.ExecuteNonQuery()
' Esegue la terza query
Cmd.CommandText = "ALTER TABLE `clienti` AUTO_INCREMENT =1;"
Cmd.CommandTimeout = 2000
Cmd.ExecuteNonQuery()
Catch ex As Exception
MsgBox("Errore Frm_Database 405 - " & ex.Message & vbCrLf & "StackTrace: " & ex.StackTrace)
End Try
dbconn.close()
Else
Exit Sub
End If
Ringrazio anticipatamente per l'aiuto vi auguro buon codice
Paolo Spagnolo
Subject
Written By
Posted
Aiuto Recupero indici cancellati in tabella
October 26, 2023 02:33AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.