General information
Category:
Database DAO/RDO/ODBC/ADO
Your welcome. If your new to VB/ADO, you may want to look into wrapping
your ADO code in a custom control. It makes it easier to manage and
provides a VFP 'class-like' wrapper for your ADO code with the extra
benefit of being able to become an OCX control down the road.
>>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!
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only