Dim Cad As String
Dim SQL As String
Set cn = New ADODB.Connection
Set rs = New ADODB.Recordset
'Cad = "Driver={INFORMIX 3.82 (32 Bit)};Server=192.168.100.192;Database=tbase;Uid=ias;Pwd=ias123;"
Cad = "Dsn=SFI;Driver={INFORMIX 3.82 32 BIT};Host=192.168.xxx.xxx;Server=online;Service=10530;Protocol=onsoctcp;Database=tbase;Uid=xxx;Pwd=xxx;"
'Cad = "Provider=Ifxoledbc.2;Persist Security info=True;Data Source=tbase@online;"
cn.ConnectionString = Cad
cn.Open Cad
If cn.Errors.Count > 0 Then
MsgBox "Error al Conectar", vbCritical
Else
MsgBox "Conexion Establecida", vbInformation
End If
Set cm.ActiveConnection = cn
cm.CommandText = "select gbdacrseg from gbdac"
rs.Open SQL, cm, adOpenStatic, adLockBatchOptimistic
Set DgUsuario.DataSource = rs