Ver Mensaje Individual
  #3 (permalink)  
Antiguo 03/12/2008, 15:12
Avatar de fbirrer
fbirrer
 
Fecha de Ingreso: enero-2006
Ubicación: Santiago de Chile
Mensajes: 329
Antigüedad: 18 años, 3 meses
Puntos: 0
Respuesta: rescatar ultimo id insertado

hola sagma, encontre algo mejor....

te paso a mostrar....

Código PHP:
        Dim valor As Integer 0
        
Try
            
Dim mySelectQuery As String "insert into INTRANET_ARTICULOS ( TITULO) values ('" titulo "'); [B]SELECT Scope_Identity();[/B]"
            
Dim myCommand As New OleDbCommand(mySelectQuerymyConnection)
            
myConnection.Open()
            [
B]valor myCommand.ExecuteScalar()[/B]
        Catch 
ex As Exception
            valor 
0
        Finally
            myConnection
.Close()
        
End Try 
gracias...
__________________
Desde Santiago de Chile
Grupo Universite
Información sobre los Institutos Chilenos de Educación
www.universite.cl