>cDataDir = "C:\VFP\DATA"
>cConnectString = "Driver=Microsoft Visual Foxpro Driver;UID=;SourceType=DBF;Deleted=YES;Null=NO;SourceDB=" + cDataDir
>
>Set oData = New ADODB.Recordset
>oData.Open "SELECT * FROM DATADICT", cConnectString, adOpenStatic, adLockReadOnly
>
>While Not oData.EOF
> Debug.Print oData.Fields("Field1")
> oData.MoveNext
>Wend
>
>If you are really unfamiliar with VB, you can use the Microsoft ADO ActiveControl and bind the control to textbox's and grids semi-similar to VFP.
>
>HTH,
>Ed
>
>
>>Hi all,
>>
>>I am looking for a very simple VB sample that accesses a foxpro free table. Simply accessing the table and displaying a specific field from two records will aid my cause greatly.
>>
>>My kingdom for a use.
This is exactly what i was looking for. I really did not want to use the datacontrol. This way I feel that I have more freedom. I had been having trouble with the connection string. I cut/pasted your example renamed the table/field and it worked great.
Heartfelt Thanks!
~Joe Johnston USA
"If ye love wealth better than liberty, the tranquility of servitude better than the animated contest of freedom, go home from us in peace. We ask not your counsel or arms. Crouch down and lick the hands which feed you. May your chains set lightly upon you, and may posterity forget that ye were our countrymen."
~Samuel Adams