Accessing Access mdb from foxpro? 
Author Message
 Accessing Access mdb from foxpro?

Is there a way to read and update access databases from foxpro?


Tue, 23 Apr 2002 03:00:00 GMT  
 Accessing Access mdb from foxpro?
ODBC! There is no native connection available from Fox into Access.


Quote:
> Is there a way to read and update access databases from foxpro?



Tue, 23 Apr 2002 03:00:00 GMT  
 Accessing Access mdb from foxpro?
There are several.
1. Create an ODBC DSN. Youy can then create a remote connection ti the DSN
in a VFO database. The create remote views or use SQL Pass-Through. These
ways leave you with an updatable FoxPro cursor that will pass on
modifications to the Access database tables. The are visual tools in VFP to
do all of this. the Connection Designer, the View Designer.

2. You can use ADO to retrieve a recordset object. You use ADO properties
and methods to work with the recordset, pretty much like you would in VB but
you have to do the groundwork programmatically. The data can be bound to
Foxpro form controls, though not to the grid. If you want to turn the
recordset into a FoxPro cursor there are methods in VFPCOM.DLL to do that.

3. You can use DAO objects. Here's an example:
ojet=CREATE('DAO.DBEngine.35')
omdb = ojet.opendatabase("NWIND.MDB")
FOR i = 1 TO 100
 t = seconds()
 oRecordSet= omdb.openrecordset("select * from employees")
 *oRecordSet.movefirst
 DO WHILE NOT oRecordSet.EOF()
 for each oField in oRecordset.Fields
    next
 * FOR j = 0 TO oRecordSet.FIELDS.COUNT -1
 * NEXT j
  oRecordSet.movenext
 ENDDO
 ?? i, SECONDS() - m.t
 oRecordset.close

-Anders


| Is there a way to read and update access databases from foxpro?
|
|



Tue, 23 Apr 2002 03:00:00 GMT  
 Accessing Access mdb from foxpro?
If you are using Visual FoxPro, look at using Remote Views.  ODBC will be
the method of connectivity to the Access database (or whatever other kind of
database).

Geoff


Quote:
> ODBC! There is no native connection available from Fox into Access.

[original post snipped]


Wed, 24 Apr 2002 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. foxpro and access....or foxpro vs access

2. Attaching to DBC from Access MDB

3. ODBC - extracting data from Access .MDB file

4. Fox 2.6 and Access MDB files

5. ms access mdb create?

6. Create Access MDB programatically

7. Very strange: remote view on Access MDB won't open

8. Talk to ACCESS .MDB files?

9. Reading MS Access .mdb files from VFP

10. can VFP read and write Access MDB files?

11. Writing to Access database (.mdb)

12. Access MDB from VFP

 

 
Powered by phpBB® Forum Software