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.

Mensaje de no conectado a la Base de Datos

publicado

Hola a todos

Requiero de su ayuda para completar el siguiente macro

 

Private Sub UserForm_Initialize()
Dim Cnn As New ADODB.Connection
Dim Rs As New ADODB.Recordset, Sql As String
Dim Hoja As Object


ComboBox1.ColumnCount = 4
ComboBox1.ColumnWidths = "50;40;100;150"
Set Cnn = New ADODB.Connection
Cnn.Open "Driver={SQL Server}; Server=10.15.50.50; Database=pruebas; Uid=sa;Pwd=123456"
Set Rs = New ADODB.Recordset
Sql = "SELECT Usuario, Contraseña, Hojas_Activas, Nombre, Unidad FROM Usuarios"
Rs.Open Sql, Cnn, 3, 3, adCmdText
If Not Rs.EOF = True Then ComboBox1.Column = Rs.GetRows
Cnn.Close

 

Lo que requiero es lo siguiente

1 limitar a 10 segundo el tiempo maximo para buscar si la base de datos esta disponible

2 Que mande un mensaje cuando la base datos no esta disponible o no se puede conectar con el servidor SQL 

 

Muchas gracias por las ayudas

Featured Replies

publicado
  • Autor

Buenas tardes. Lo más importante es un mensaje donde se indique que la base de datos no esta disponible. Espero alguno me pueda ayuda.

Saludos.

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.