I'm trying to copy data from a DBase Table (Table1 in c:\test) to
another identical dBase table in other folder(Table1 in c:\other).
(VB6, Windows XP Pro, Windows 2000)
Here is my code:
------------------------------------
Dim cn As ADODB.Connection
Set cn = New ADODB.Connection
cn.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=c:\test;Extended
Properties=dBase III;"
cn.Execute "SELECT * INTO Table1.DBF IN 'c:\other' 'dBASE III' from
Table1.DBF"
cn.Close
Set cn = Nothing
------------------------------------
The following error occur when I try to execute SELECT * INTO
statement:
The Microsoft Jet database engine cannot open the file 'c:\other'. It
is already opened exclusively by another user, or you need permission
to view its data.
What is the problem??
Thanks,
Boris
Paul Clement - 31 Aug 2005 16:51 GMT
¤ I'm trying to copy data from a DBase Table (Table1 in c:\test) to
¤ another identical dBase table in other folder(Table1 in c:\other).
¤ (VB6, Windows XP Pro, Windows 2000)
¤
¤ Here is my code:
¤
¤ ------------------------------------
¤ Dim cn As ADODB.Connection
¤ Set cn = New ADODB.Connection
¤ cn.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=c:\test;Extended
¤ Properties=dBase III;"
¤
¤ cn.Execute "SELECT * INTO Table1.DBF IN 'c:\other' 'dBASE III' from
¤ Table1.DBF"
¤
¤ cn.Close
¤ Set cn = Nothing
¤ ------------------------------------
¤
¤ The following error occur when I try to execute SELECT * INTO
¤ statement:
¤
¤ The Microsoft Jet database engine cannot open the file 'c:\other'. It
¤ is already opened exclusively by another user, or you need permission
¤ to view its data.
¤
Try some slightly different syntax to see if you can work around the problem:
"INSERT INTO Table1 SELECT * FROM [dBase III;DATABASE=c:\other].[Table1]"
Paul
~~~~
Microsoft MVP (Visual Basic)