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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VFP table insert into SQL 2000

Status
Not open for further replies.

Ed Andres

IS-IT--Management
Mar 27, 2001
142
US
This seems harder than I think it should be but I can't seem to work through this easily. I have a VFP table that has the identical structure as a SQL table except for a time stamp and identity column. I would like to insert records from the VFP table to the SQL table. How would I start? I was hoping to use the INSERT . . SELECT but don't know enough to try it out.

Any help is appreciated!

Thanks,
Ed
 
Ed,
Depending on your version of VFP, you have 3 or 4 (more?) choices.
1) Create a Remote View with updates and send the data with a VFP INSERT.
2) Create a cODBC connection and use SQL Passthrough (SPT) - this time the Insert is a bit different because it conforms to the SQL server syntax.
3) Create an OLE DB connection and use ADO to insert the data. It's a bit more complex than the two above.
4) If you are using 8.0 (or higher :)) then you can use a Cursor Adapter and use any of three or four more variants!

Rick
 
Rick,
Thanks for the quick response! I can't believe that I didn't think of a remote view. I have a test setup and it seem like it will work just fine.

Thanks!
 
Ed,

There have been several recent threads in the "Microsoft: VFP - Databases, SQL&VFP, and Reports" forum which ask almost exactly the same question, and which contain a lot of useful advice.

Mike


Mike Lewis
Edinburgh, Scotland

My Visual Foxpro web site: My Crystal Reports web site:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top