Discussion Locked

VFP data into MS SQL

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I'm having a problem getting data from an open VFP 7 table into an MS SQL table through VFP 7 code. I think I have the SQL statement correct and I don't get any errors when I run the VFP program, but nothing gets entered into the SQL table.

Any ideas, suggestions?

3 replies

by hmertens

Could there be an implicit "BEGIN TRANSACTION" getting set, and then getting rollback'd because of some minor error?

Are you trying to insert rows VFP->SQL or create a new table in the SQL db? Are you rolling back any data in the VFP site prior to committing the SQL side?

Saying "open VFP 7 table", I presume that you have a connection to the SQL db and have VFP do the work.

Have you tried linking the VFP tables to MSSQL and then have MSSQL do the work, just to test that there are no data under/over flow or other isses in the data itself? Using MSSQL2k? Then you could then use DTS, Enterprise Manager and QueryAnalyzer to check for gotcha issues. A good first step is to just copy the table into SQL and compare schemas between the table created by a direct import and that which have established previously. Beware of code-page difference, especially in MSSQL2k where they can be different on the server, datatabase, table and column level.

by jcannon1

Good points that I did end up checking for. I am using VFP 7 and SQL 2000. Found out that SQL was giving me an error that I didn't code VFP to look for. Once I did that, I was then able to load the data into SQL using the Text...EndText function. Can't that the tech that point that out to me enough.

This discussion is closed to new replies.