Datagrid

Miguel
01 de Marzo del 2004
Hola hay alguna forma de usar un datagrid sin adodc, porque tengo un problema y es el siguiente, pongo dentro del form_load el connection string y el recordsource del adodc y me da un error.
Queria saber si se puede hacer de otra forma.
Incluyo el codigo por si he puesto algo mal.

Private Sub Form_Load()
Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:ProyectoSeatSeat.mdb;Persist Security Info=False"
If codordenreparacion <> 0 Then
sql = "select * from Repara where Orden_Reparacion=codordenreparacion order by Orden_Reparacion asc"

Else
If codempleado <> 0 Then
sql = "select * from Repara where Codigo_Empleado=codempleado order by Codigo_Empleado asc"
Else

sql = "select * from Repara where Fecha>=fechainicio and Fecha<=fechafin"

End If
End If



Adodc1.RecordSource = sql
Adodc1.Refresh
end sub