Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Update SQL table from VFP table
Message
De
01/09/2015 10:17:23
 
 
À
31/08/2015 10:33:27
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Application:
Desktop
Divers
Thread ID:
01623948
Message ID:
01624089
Vues:
67
>>
>>This is what I get for working on a Friday...
>>
>>The Fox table is ~700 rows at the moment, a monthly update from outside, so no telling how large or small it might get; the SQL table is several million. I've written a VFP program to handle the file, look up ID#s, post a couple changes. Last in the process, it needs to update the SQL file so another internal app can act upon the changes, and I'd prefer to do it from the VFP program.
>>
>>I'm not strong with SQL server, but I can open the SQL database, and I have the update statement but it seems to imply both tables in the same format. I don't know how to get the VFP table into SQL temporarily, or write to the SQL table without downloading the whole thing...
>
>There are several ways to push data from VFP to SQL Server. You can use ODBC, you can define linked servers, you can use SQL Server Integration Services, etc.
>
>Once the data is in a temp table in SQL Server, you can write an UPDATE statement to join your 2 SQL tables together.
>
>I think the first goal is to get the data into SQL Server. if you do a web search on "upload vfp data into sql server", you'll find many online articles that talk about it.
>
>My personal opinion, you should look at SQL Server Integration Services. Not only would it help you here, it might also help you down the road. SSIS is a great tool for getting data from one area to another. You can even use the SQL Server Import/Export wizard to define the "source area" (your fox table) and your "destination area" (the target temporary sql server table), and you can save the steps as an SSIS package.
>
>So while there are many routes you can take, I'd suggest looking at SSIS. There are many websites and blogs that have talked about this. Here's one of them:
>
>https://social.msdn.microsoft.com/Forums/sqlserver/en-US/c32c0820-0e2d-4461-820a-530541c769c6/creating-a-ssis-package-to-get-data-from-free-dbf-visual-foxpro-table-in-64-bit-sql-server?forum=sqlintegrationservices

I have started toying with SSIS; I inherited a package that calls a VFP update program. I don't know if the reverse (calling SSIS from VFP) is possible.

I was going to say a single Fox executable would be the simplest, cleanest solution. Doing it as an SSIS package allows coworkers to run it also. ;)
Just means I need to figure out how to make SQL do the work I was doing in Fox.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform