Ver Mensaje Individual
  #3 (permalink)  
Antiguo 16/06/2004, 16:24
sbrasburg
 
Fecha de Ingreso: mayo-2004
Ubicación: Buenos Aires
Mensajes: 3
Antigüedad: 20 años, 11 meses
Puntos: 0
<%
Sub Grabar(Opcion)
Dim StrArch
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Mode=2
Conn.Open("DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("\aele\db\bd1.mdb"))


set rs=createobject("ADODB.Recordset")
rs.CursorType = 1
rs.LockType = 3
if opcion=1 then 'alta
StrArch="select * from " & NroCuenta & " where debito=-1"
else
if opcion=3 or opcion=6 or opcion=9 then
StrArch="select * from " & NroCuenta & " where id=" & DId
end if
end if

rs.open StrArch, Conn
if opcion=1 then
rs.addnew
else
if opcion=3 or opcion=6 or opcion=9 then
rs.movefirst
end if
end if

if opcion=9 then
rs.delete
else
rs("fecha")=ModFecha(FormatDateTime(Dfecha, 2))
rs("cod")=dtipomov
if destado="on" then
rs("estado")=1
else
rs("estado")=0
end if
rs("obs")=dobs
rs("credito")=dcredito
rs("debito")=ddebito
end if
rs.update
rs.close
set rs=nothing
Conn.close
set Conn=nothing

End Sub
%>