Hi Ramesh,
Your advise worked fine. But now I ran into the next problem. When working with the recordset in VB, I'm only allowed to display the first record. I have tried with "Movenext", but I'm told that this method is not supported.
Then I tried "Typename" but it told me that I was working on a "Fields" and not on a recordset.
Hope you also can help with this.
>Hi Benn
>
>"oConn.Close" is creating the problem. If you close the connection, the recordset which is bounded by "oRecordset.ActiveConnection = oConn" also closed.
>
>You can also open the connection in recordset itself like :
>
>oRecordset.Open("SELECT * FROM Freetime","DRIVER=Microsoft Visual FoxPro Driver;" + ;
> "SourceType=DBC;SourceDB=D:\DATA\VFP_60\OLE\ADO.DBC;" + ;
> "Exclusive=NO;BackGroundFetch=NO;NULL=NO;Collate=MACHINE")
>
>HTH
Benn Kjaer
MS Certified Professional - Visual Foxpro
"There is something rotten in the state of Denmark"
"Why make user-friendly programs, when there aren’t any friendly users :o)"