Ver Mensaje Individual
  #3 (permalink)  
Antiguo 23/10/2008, 10:04
Avatar de alberto_gc
alberto_gc
 
Fecha de Ingreso: septiembre-2008
Mensajes: 152
Antigüedad: 18 años
Puntos: 0
Respuesta: extraer un autonumerico de tabla

Cita:
Iniciado por daniel00 Ver Mensaje
Dentro de un sentencia Delete (SQL)

Código:
... 
DELETE FROM miTabla WHERE tuCampoAutonumerico = valorCampoOculto
...
mmm si ya hice eso pero me mandun error que dice falta operador
este es mi codigo que tengo
Código PHP:
<&#37;

     
Dim oConn,strSQL, objRS,rst
     
    Set oConn 
= Server.CreateObject("ADODB.Connection") 
    
set rst = Server.CreateObject("ADODB.RecordSet")
    
oConn.Open("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=C:\canteras.mdb")  

     
    
strSQL = "delete from bolsat where Identificador =  (" &Identificador& ")"
    
Set objRS = oConn.execute(strSQL)
    
  
strSQL = "SELECT Identificador, Nombres, Apellidos, Sexo, Edad, Solicitado, Correo FROM bolsat" 
   
Set objRS = oConn.Execute(strSQL)   
%>
<
table width="200" border="0" cellpadding="10" cellspacing="0">
          <
td><strong>id usuario</strong></td>
            <
td><strong>Nombre(s)</strong></td>
            <
td><strong>Apellidos</strong></td>
            <
td><strong>Sexo</strong></td>
            <
td><strong>Edad</strong></td>
            <
td><strong>Solicitado</strong></td>
            <
td><strong>Correo</strong></td>
          </
tr>
           <%            

   while (
not objRS.Eof)      

   
Response.Write("<tr><td> &nbsp;" & objRS("Identificador") &  
"&nbsp;</td><td> &nbsp;" & objRS("Nombres") &  
"&nbsp;</td><td> &nbsp;" & objRS("Apellidos") & 
 
"&nbsp;</td><td> &nbsp;" & objRS("Sexo") &  
"&nbsp;</td><td> &nbsp;" & objRS("Edad") &  
"&nbsp;</td><td> &nbsp;" & objRS("Solicitado") & 
 
"&nbsp;</td><td> &nbsp;" & objRS("Correo") &  "&nbsp;</td></tr>") 

      
objRS.MoveNext 
   wend 
    
   oConn
.Close 
   set objRS 
= nothing 
   set oConn 
= nothing

%>
</
table>

<
hr></hr>
<
p><a href="veribol.asp" class="Estilo1">Borrado volver</a> </p>
</
body>