Ver Mensaje Individual
  #1 (permalink)  
Antiguo 08/09/2005, 10:32
Avatar de mazingerz
mazingerz
 
Fecha de Ingreso: febrero-2003
Ubicación: Sarasota FL
Mensajes: 147
Antigüedad: 22 años, 2 meses
Puntos: 0
Delete en Acces

Hola, he tratado de Eliminar Registros en una tabla de paso, bueno creo un recordset y veo los datos, pero al eliminar los registros no puede.
Microsoft JET Database Engine (0x80004005)
Could not delete from specified tables.
'Algo del Codigo


Dim Cnn, Rst, Cmd, StrCnn, StrSql, lRecords, lRecDeleted
Const adoOpenKeySet = 1
Const AdoLockOptimistic=3
lRecords = 0
lRecDeleted = 0
If cstr(Request.QueryString("Opcion"))="limpiar" then
' Open connection. OLEDB
StrCnn = "Provider=Microsoft.Jet.OLEDB.4.0;User ID=Admin;Data Source=c:\internet\Web.mdb;User Id=Admin;PASSWORD=;"
Set cnn = Server.CreateObject("ADODB.Connection")
With Cnn
.CursorLocation=3
.ConnectionTimeout=60
.Open strCnn
.CommandTimeout = 600
End With
' Open Recordset
strSql = "Select * From Dbf_Sector"
Set Rst = Server.CreateObject("ADODB.Recordset")
With Rst
.CursorLocation=3
.CacheSize=60
Call .Open (strSql,Cnn, 2 , 3 ,1)
End With
If Not Rst.EOF Then
lRecords = Rst.RecordCount
End If
strSql = "Delete * From Dbf_Sector;"
Cnn.Execute "Delete * From Dbf_Sector;" , lRecDeleted, 1
ACA SE MUERE.....
....
....
....