Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / Database Access / August 2005



Tip: Looking for answers? Try searching our database.

Error in SELECT  INTO in dbase tables

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
boris@ciudadhabana.com - 31 Aug 2005 01:10 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.

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)
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.