Amigos tengo el siguiente error :
Private Sub Command1_Click()
Unload Me
End Sub
Private Sub Form_Load()
Dim cnn As ADODB.Connection
Dim rs As ADODB.Recordset
Dim str As String
Set cnn = New ADODB.Connection
cnn.ConnectionString = "Dsn=base1;Driver={INFORMIX 3.81 32 BIT};Host=191.0.0.220;Server=cotaco_tli;Service=sqlexec;Protocol=onsoctcp;Database=cotaco;UID=informix;PWD=katana"
cnn.Open
str = "SELECT * FROM personal order by pnumer"
Set rs = New ADODB.Recordset
rs.Open str, cnn, adOpenStatic, adLockOptimistic
Set DataGrid1.DataSource = str <<<<====== ahi marca el error
End Sub
Private Sub from_unload()
Set DataGrid1.DataSource = Nothing
rs.Close
Set rs = Nothing
cnn.Close
Set cnn = Nothing
End Sub
******** En el setdatagrid1 marca el error .
Quiero mostrar los datos del sql en el datagrid.
Gracias.
SpIdErFuCk