Solved

FoxPro 2.6 to ACCESS

Posted on 2003-11-10
3
143 Views
Last Modified: 2010-05-03
Hello,

I need a function in VB6 that will either import data from FP 2.6 tables or using VBA automate the same process.  I cannot use the import function in ACCESS to do this, because it needs to be automatic.  Please provide example code, no links.

Thanks in advance,
aj85
0
Comment
Question by:aj85
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 5

Accepted Solution

by:
Goofytouy earned 400 total points
ID: 9715749

On a form, you must put 2 data controls bounded to the source DB in Fox 2.6 and state the Connection property to FP 2.6

The 2nd data control, must be bounded to the target DB, Connection Access.
I presume you know the fields definition of the source DB and you have copied it to the target DB.

Let's presume you have 10 fields on each base, source data control named Source, and target db name Target


Private Sub moverecords()
        Source.Recordset.MoveFirst
        Do While Not Source.Recordset.EOF
              Target.Recordset.AddNew
              For N=0 to 9        && 9 is because from 0 to 9 you have 10 items, and field indexes start in 0
                      Target.Recordset.Fields(N)=Source.Recordset.Fields(N)
              Next N
              Target.Recordset.Update
              Source.Recordset.MoveNext
        Loop
End Sub

Hope this example, helps.

0
 

Author Comment

by:aj85
ID: 9979312
I am working on this I will get back to you shortly.

Thanks,
aj85
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month9 days, 3 hours left to enroll

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question