Ver Mensaje Individual
  #3 (permalink)  
Antiguo 19/12/2002, 07:03
KorelTx
 
Fecha de Ingreso: junio-2002
Mensajes: 13
Antigüedad: 22 años, 10 meses
Puntos: 0
Public Function selectencuesta(ByVal campo As string, ByVal queryIdencuesta As Integer)

Dim ConnectionString As String
Dim strsql As String
Dim rs As Recordset
Dim dato as string


ConnectionString = "Driver={SQL Server};Description=***;SERVER=ANDRES;UID=**;PWD=*
***;DATABASE=****"

dato = Cstr(campo)

Set rs = CreateObject("ADODB.Recordset")
strsql = "update encuestas set " & campo & " = " & dato & "+1 where idencuesta= " & queryIdencuesta & ""


rs.Open strsql, ConnectionString, adLockPessimistic, adLockPessimistic
Set selectencuesta = rs

End Function