Insert records from a database in floppy drive to hard drive 
Author Message
 Insert records from a database in floppy drive to hard drive

Hi,

I am developing an application in VB with Visual Foxpro 6.0 as my back
end. I need to transfer records from a dbf file in drive A to the main
database in drive C. the dbf file in drive A has the same structure as
that in the main database and all records in A has to be copied to the
main database.  I need to be doing this via code, by setting up a
database object (using DAO).

the code i wrote for that was

dim db as database
dim str as string
set db = opendatabase("C:\Path",false,false,"foxpro 3.0;")

'Ctablename is the name of the dbf in C drive
'Atablename is the name of the dbf in A drive

str = "INSERT INTO Ctablename SELECT * FROM Atablename in 'A:\Path'"
db.execute str

This does not work.

Would appreciate any help regarding this.


Thanks.

Sent via Deja.com http://www.*-*-*.com/
Share what you know. Learn what you don't.



Tue, 01 Jan 2002 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Floppy or Hard Disk Drive?

2. Determining drive letter assigned to floppy drive?

3. How to read the hard drives drive no.

4. Hard Drive Serial Number/Total Drive Size

5. Help needed reading database on CD and writing to database on hard drive

6. Read Hard Drive Boot Record From VB

7. Read Hard Drive Boot Record From VB

8. Find/Open a Database from the Hard Drive

9. Find/Open a Database from the Hard Drive

10. Find/Open a Database from the Hard Drive

11. Program crashed after selecting floppy drive, CD-ROM drive, Zip drive that didn't have disk in

12. Access 2000 causes REPEATED floppy drive access?

 

 
Powered by phpBB® Forum Software