can VFP read and write Access MDB files? 
Author Message
 can VFP read and write Access MDB files?

We have a Visual Basic program that uses an Access MDB database.  We'd
also like to read and write that database with a Visual FoxPro
program.  Can we?  If so, how?  



Fri, 08 Dec 2000 03:00:00 GMT  
 can VFP read and write Access MDB files?

You can read and write Access data using ODBC. To do this you must create a
connection then use either SQL pass-through (the SQLEXEC() function) or
remote views to access the Access tables.

Quote:

>We have a Visual Basic program that uses an Access MDB database.  We'd
>also like to read and write that database with a Visual FoxPro
>program.  Can we?  If so, how?



Fri, 08 Dec 2000 03:00:00 GMT  
 can VFP read and write Access MDB files?

Hi

Not a problem at all. There are two ways you could achieve this. One is SQL
PassThorough where you will do things like Connection, queries and updateion
manually. Second one is to create remote views on the access tables and use
them like they are VFP tables.

Both methods use ODBC to connect to access.

--
Kamal Patel
Flash Creative Management, NJ
(Please remove NOSPAM from my mailing address for sending any mails)

Quote:

>We have a Visual Basic program that uses an Access MDB database.  We'd
>also like to read and write that database with a Visual FoxPro
>program.  Can we?  If so, how?



Sat, 09 Dec 2000 03:00:00 GMT  
 can VFP read and write Access MDB files?

also you can use ADO from VFP

Arnon

Quote:
>Not a problem at all. There are two ways you could achieve this. One is SQL
>PassThorough where you will do things like Connection, queries and
updateion
>manually. Second one is to create remote views on the access tables and use
>them like they are VFP tables.

>Both methods use ODBC to connect to access.

>--
>Kamal Patel
>Flash Creative Management, NJ
>(Please remove NOSPAM from my mailing address for sending any mails)


>>We have a Visual Basic program that uses an Access MDB database.  We'd
>>also like to read and write that database with a Visual FoxPro
>>program.  Can we?  If so, how?



Sun, 10 Dec 2000 03:00:00 GMT  
 can VFP read and write Access MDB files?

here is a little program I used yesterday
to benchmark speed, loading one million records to an ACCESS table called BIC
. It consistantly loaded at a rate of 4500 records per minute.
Then I told VFP wizard to create a form based on a VIEW of Big (through ODBC)
and I used ACCESS Wizard to create an ACCESS form. Then I simultaneously tried
to update the same record (on my 233 mhz dell laptop), using both VFP odbc and
ACCESS native,... and record locking (optomistic) works. But beware of inherent
slowness problems with ACCESS tables even when used in ACCess native (no odbc)
* loadmdb.prg
CLOSE DATABASES
OPEN DATABASE "data1"
H = SQLCONNECT("connect2")
FOR X = 1 TO 1000000
  F2 = "F2/" + ALLT(STR(X))
  C = "INSERT INTO BIG (ID,DESCRIP) VALUES ("+ ALLT(STR(X)) + "," + CHR(39) +
F2 + CHR(39) + ")"
  N = SQLEXEC(H,C)
  IF MOD(X,1000) = 0
   N = SQLCOMMIT(H)
  ENDIF

NEXT X
  N = SQLCOMMIT(H)

  N = SQLEXEC(H,"SELECT * FROM BIG")
  BROWSE



Sun, 10 Dec 2000 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Reading MS Access .mdb files from VFP

2. Writing to Access database (.mdb)

3. read/write FoxPro 2.6 *and* Access 97 database files

4. Read/Write Expression, Read/Write Method

5. Can VFP read and write to access97 files?

6. Read/write INI file in VFP 5

7. ODBC - extracting data from Access .MDB file

8. Fox 2.6 and Access MDB files

9. Talk to ACCESS .MDB files?

10. Using SQLConfigDataSource to access mdb file via ODBC

11. Accessing Access mdb from foxpro?

12. Access MDB from VFP

 

 
Powered by phpBB® Forum Software