hello i have a database n i want to connect to it using ADODB.connection, this is the code i use

Dim con As New ADODB.Connection
Dim data As New ADODB.Record

data.Open "select * from table1", con
MsgBox data.fields(0)

but it says "The connetion can't be used to perform this operation, it is either closed or invalid in this context"