Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I put Data from VFP-Table in a Oracle Table

Status
Not open for further replies.

154868

Programmer
Dec 5, 2003
23
How can I put Data from VFP-Table in a Oracle Table ?

First I've installed the Oracle Client. That was o.k.

But now I'm looking for tips, what is the best way
to put Data from a VFP-Table in a VFP-Database into
a Table in a Oracle Database.

Thank you for any help

Andreas

Andreas Wichmann
DataBit GmbH
Switzerland
 

Andreas,

What version of VFP do you have? If it is 6.0 or below, there is an Oracle Upsizing Wizard on the Tools menu. It's not perfect, but it might be OK for a quick and simple transfer.

Failing that, you should create your tables on Oracle first, then create remote views in VFP on those tables. Make sure they are updatable. Finally, append the data from your existing Foxpro tables into the remote views.

If you don't know how to do remote views, read the relevant topics in the VFP Help.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

My sites:
Visual FoxPro (www.ml-consult.demon.co.uk)
Crystal Reports (www.ml-crystal.com)
 
Hi Mike

I use VFP 8.0 / windows XP prof.

The tables in Oracle-Databases are created.

I know remote views, but is there any other way as remote views ?

Andreas


Andreas Wichmann
DataBit GmbH
Switzerland
 

Andreas,

Yes. You can always write a program that reads each record in turn from your source tables, and then generates a SQL INSERT command using data in the record. You then send the command to Oracle via SQLEXEC().

This approach is much more flexible than using remote views, because you have the opportunity to modify the data in various ways (for example, converting blank dates to nulls). But it is more work than using remote views. Is there any special reason why you want to avoid RVs?

In addition, it's possible that Oracle has an import tool of its own, but I am not familiar enough with the product to advise on that.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

My sites:
Visual FoxPro (www.ml-consult.demon.co.uk)
Crystal Reports (www.ml-crystal.com)
 
Hi Mike

I prefer a command-coded way. The concept is following:
- I store the programm code in a MEMO-Field (easy to modify)
- I start the programm in background (with parameters)
- I execute the programm by EXECSCRIPT
- the upload to Oracle is in regular intervals triggert by windows task-manager (for example every night)
- For Errors I write a HTML-Report and send it by mail to a spec. adress

so I think the best way is in VFP-Code without any RV's

Have anybody a example for connection/upload(insert in)/diconnection to Oracle in coded form ?

Andreas
Andreas

Andreas Wichmann
DataBit GmbH
Switzerland
 

Andreas,

I really can't see the point of putting the code in memo fields and running it via EXECSCRIPT(). Why not just run it in the normal way? You can still trigger it to run every night.

Also, that doesn't explain why you don't use remote views, which would simplify the programming.

Or, am I missing something?

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

My sites:
Visual FoxPro (www.ml-consult.demon.co.uk)
Crystal Reports (www.ml-crystal.com)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top