Ver Mensaje Individual
  #2 (permalink)  
Antiguo 08/04/2009, 10:32
dulcetapia
 
Fecha de Ingreso: abril-2009
Mensajes: 1
Antigüedad: 16 años
Puntos: 0
Respuesta: Como reindexar una tabla .dbf desde vb ?, como hacer el famoso pack que se

En dbpath pones la direccion de la tabla y en la tabla pones el nombre de la tabla, con esto eliminas los que no se han borrado, pero todavia no encuentro como reindexar.




dim dbpath as string
dim tabla as string

Set dbconn = New Connection

Dim fpCommand As New ADODB.Command
Debug.Print "DBP " & dbpath


dbconn.Open ("PROVIDER=vfpoledb;Data Source=" & dbpath)
Set fpCommand = New ADODB.Command
fpCommand.CommandType = adCmdText


Set fpCommand.ActiveConnection = dbconn


fpCommand.CommandText = "Set Exclusive On"
fpCommand.Execute

fpCommand.CommandText = "PACK "& tabla &""
fpCommand.Execute


dbconn.Close
Set dbconn = Nothing