tags:

views:

57

answers:

3

There is one software application in which foxpro is used as back-end. Now this application is need to change. And want to develop same new application in .net. But now database will be sql. And I don't want to let user make all data entry again. Is this possible to use data of foxpro in new application with .net?

EDIT: I have not coding of old application.

+3  A: 

How about using the FoxPro OLE DB provider and the .NET OleDbConnection (etc) classes? Or an ODBC driver and OdbcConnection?

MSDN has a page about the OLE DB route. I'm afraid I don't know what the pros and cons are between the two approaches - there are certainly pages around on both. If this is just for sucking the data out once, it probably won't matter too much - you're not likely to need anything advanced.

Jon Skeet
@Jon Skeet, Hello sir.. Can not we use sqlconnection here, or use sql database as a back-end using foxpro data ?
Harikrishna
@Harikrishna: SqlConnection is the class for talking to SQL server. I don't know enough about FoxPro to know whether you can use SQL server as a backend - but I wouldn't advise it even if you could. I would suggest moving away from FoxPro entirely, but using one of the access routes in my answer to migrate the data.
Jon Skeet
@Jon Skeet,I want to use only sql sever as back-end but I don't want to let user make entry again for all old data which he had entered in old application.
Harikrishna
@Harikrishna: As I've said, you just write code to migrate the existing data out of the old application and into the new one. The user won't need to re-enter any data, and you can move away from FoxPro completely.
Jon Skeet
@Jon Skeet, But I have not code of old application.
Harikrishna
@Harikrishna: But you have the data. If you don't know what that data's meant to represent, you're basically stuck either way.
Jon Skeet
@Jon Skeet, Then now what can I do for that purpose like using sql server and also using old data of foxpro ?
Harikrishna
@Harikrishna: The point would be to move the data *out* of FoxPro and insert it into SQL server.
Jon Skeet
@Jon Skeet,Ok.. Thanks...Sir..
Harikrishna
@Jon Skeet, Sir then after retrieving foxpro data, which database I should use as a back-end with .net like access,sql server or what ?
Harikrishna
+2  A: 

What is required as far as I understand is a method by which you can migrate the Visual FoxPro data into an SQL Server database, which can then be used with the new .NET application directly, or as an interim stage in getting the data into a new schema.

What you need to do that, if you don't want to do it manually, is a copy of Visual FoxPro 9 and the Upsizing Wizard that comes with it.

Alan B
@Alan, Then sql server only will be used as a back-end,is it ?
Harikrishna
Yes, the Upsizing Wizard takes a Visual FoxPro database (including data) and migrates data and schema into a new SQL Server database, as far as is possible. You can then do what you like with it!
Alan B
@Alan,Then I have to make the new database same as in foxpro like all the fields and everything else?
Harikrishna
You will end up with a SQL Server database with (largely) the same tables/columns/indexes as the VFP one. You can either use that directly or use it as a mid-point to getting the data into a different SQL Server database.
Alan B
A: 

If you have the full version of SQL Server, use SSIS, it will give you the most flexibility for transforming data from foxpro to the new tables in SQL Server. Plus it is easy to re-run if necessary.

If you have a version of FoxPro, which you should have if you have an MSDN license, you can use the upsizing Wizard that Alan B mentioned, make SQL Pass-Through calls, CursorAdapters, or remote views.

Otherwise you can use OleDB from C# to get the data from foxpro, and then write it to SQL Server. Not really worth learning though if you don't plan on accessing the foxpro data from the new application.

Brian Vander Plaats