Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Foxpro Connectivity without bound controls or objects
Message
From
28/10/1997 01:58:45
 
General information
Forum:
Visual C++
Category:
Other
Miscellaneous
Thread ID:
00056806
Message ID:
00056939
Views:
24
>I can easily add FOXPRO 3.0 databases to my forms, but how can I do it without binding objects to the fields. In otherwords, how do I create the connectivity through code only??
>
>RDO, DAO, ODBC, JET?? How?? HELP!!!
>
>Keith
Hi Keith,
You can open a Foxpro database in Visual Basic by attaching the Foxpro table to a MS Access database or even directly.
To open a Microsoft FoxPro table directly, create a Database object and use the OpenDatabase method to indicate the path, exclusive access value, read-only value, and data source name.
The following example shows how to open an external FoxPro version 2.0 table and then create a Recordset object from the table.

Dim dbsJet As Database
Dim rstAccounts As Recordset

' Open external FoxPro database.
Set dbsJet = OpenDatabase _
("\\FOXPRO\DATA\AP", False, False, "FoxPro 2.0;")

' Create Recordset object from Accounts table.
Set rstAccounts = dbsCurrent.OpenRecordset("Accounts")

You can see VB help under the topic Accessing Data in a Microsoft FoxPro Database. This example also I have quoted from there only. Hope this solves your problem.

Manika
Previous
Reply
Map
View

Click here to load this message in the networking platform