AccessBlog.net

News, links, downloads, tips and tricks on Microsoft Access and related

About Me Search
Alex
Name:Alex Dybenko

Location:Moscow, Russia

Tuesday, September 05, 2006

How to import Access 2000 table to Access 97 database

ADO can help. ADO and Jet 4.0 files are installed with operating system since Windows 2000, so we can certainly use it, even we have only Access 97 installed. Here a sample code:

Dim oCon As Object
Set oCon = CreateObject("ADODB.Connection")
oCon.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & _
CurrentDb.Name & ";Persist Security Info=False"
oCon.Execute "Delete * From Clients"
oCon.Execute "INSERT INTO Clients SELECT * FROM Clients IN 'C:\Access2000.mdb'"
oCon.Close

0 Comments:

Post a Comment

Links to this post:

Create a Link

<< Home