Saltar al contenido
View in the app

A better way to browse. Learn more.

Ayuda Excel

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Ayuda con Macro que guarda imagenes en tabla de Oracle

publicado

 

Hola les pido su ayuda con lo siguiente... tengo un formulario en Excel que me ayuda a actualizar un catalogo de fotos Web estas fotos están en una tabla de una base de datos Oracle, la macro que utilizo estaba funcionando bien hacia el cambio sin problemas solo que debido a otros problemas tuve que reinstalar el SO en mi equipo y al querer usar de nuevo esta macro ya no funciona, si actualiza la información pero no termina se queda congelado Excel.

Esta es la Macro que utilizo:

Sub SubirFoto()
Dim sql As String
Dim m_stream    As Object
Dim cn As Object
sql = "select foto from prueba_fotos where num_empleado=44163"
Set cn = CreateObject("ADODB.Connection")
    cn.ConnectionString = "DSN=FOTOS;UID=USUARIO;PWD=1234;DBQ=FOTOS;DBA=W;APA=T;EXC=F;FEN=T;QTO=T;FRC=10;FDL=10;LOB=T;RST=T;GDE=F;FRL=F;BAM=IfAllSuccessful;MTS=F;MDI=F;CSR=F;FWC=F;PFC=10;TLO=0;"
        Dim rst As Object
        On Error Resume Next
        cn.Open
            Set rst = CreateObject("ADODB.Recordset")
                rst.Open sql, cn, adOpenKeyset, adLockOptimistic
                Set m_stream = CreateObject("ADODB.Stream")
                    m_stream.Type = adTypeBinary
                    m_stream.Open
                    m_stream.LoadFromFile "D:\archivo_digital.jpg"
                    rst.Fields(0).Value = m_stream.Read
                    rst.Update
                Set m_stream = Nothing
            rst.Close
        cn.Close '*******AQUI ES DONDE SE QUEDA CONGELADO***********
Set cn = Nothing
Set rst = Nothing
Set m_stream = Nothing
End Sub
 


 

Featured Replies

No hay posts para mostrar

Archivado

Este tema está ahora archivado y está cerrado a más respuestas.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.