Help needed reading database on CD and writing to database on hard drive 
Author Message
 Help needed reading database on CD and writing to database on hard drive

I am tring to read some data from an Access database on CD Rom and to write
the results to hard drive.  First I need to open the table on CD in readOnly
mode.   I need to read data from a table called 'PRIMARY' on the CD Rom and
write it to a tanble called newPRIMARY in another  database on my harddrive.
Here is the code that I am using.  When I run the code, VB tells me that it
can not find the input table 'PRIMARY'.

What am I doing wrong?  Any help will be appreciated.

Maurice


Option Explicit
Dim wDB, rDB As Database, wDBStr, rDBStr As String

Private Sub cmdOK_Click()
Dim CDBName As String
Dim dbStr, rDBStr As String
Dim rRecStr As String, rRecSet As Recordset

CDBName = "E:\Location\Parts.MDB" this is the database on CD
'''''''''''''''''''''''
wDBStr = App.Path & "\Build.MDB"     'this is the database receiving the
data
Set wDB = OpenDatabase(wDBStr, dbOpenDynaset) ''define species code list
database

rDBStr = CDBName    'acquire file name and path from calling form
Set rDB = OpenDatabase(rDBStr, dbOpenDynaset, True)

wDB.Execute "SELECT * INTO newPrimary IN '" & wDBStr & "' FROM [PRIMARY] "

End Sub



Fri, 25 May 2001 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Insert records from a database in floppy drive to hard drive

2. how to read, write and create files on a hard drive

3. How to read the hard drives drive no.

4. Find/Open a Database from the Hard Drive

5. Find/Open a Database from the Hard Drive

6. Find/Open a Database from the Hard Drive

7. Help Required : Reading Comma delimited files and writing to Access Database

8. Read/Write Database with VB. HELP...

9. Open a database on a network CD drive

10. Help vb5 app to read/write access database under application control

11. help needed......creating aliases for database paths/drives

12. Automatically putting templates from a CD to Hard Drive

 

 
Powered by phpBB® Forum Software