The last couple of weeks I've been working on migrating an ASP.NET application from using a Visual FoxPro database to using SQL Server 2005. My application has it's logic in library DLL and with some layering uses Typed DataSets to connect to the database.
Typical code within the data access layer looks like this:
internal ViewDataSet.RequestViewDataTable GetViewByPrimaryUser( string user )
{
using ( ViewDataSetTableAdapters.RequestViewTableAdapter _adapter
= new ViewDataSetTableAdapters.RequestViewTableAdapter() )
{
ViewDataSet.RequestViewDataTable table;
table = _adapter.GetByPrimaryUser( user.Trim() );
return table;
}
}
The method 'GetByPrimaryUser' is defined on the TableAdapter and using the GUI designer in Visual Studio I manage my typed datasets. All SQL is stored within the Typed DataSets. There is very limited use of stored procedures.
Migrating the .NET code from using a Visual FoxPro database to using SQL Server 2005 has involved the following:
- Change the connection string property on every datatable to use the SQL Server connection string instead of the FoxPro connection string.
- Opening every single query and changing the SQL parameters from question marks '?' to named parameters like '@user'.
- Rechecking the mapping of the columns in the datatable, sometimes these would get messed up. Especially in cases where non-database columns where added to the datatable.
- Rechecking column expressions.
- Some areas of the code accessed the OleDbDataAdapter and OleDbConnection within the typed dataset, this had to be replaced with SqlDataAdapter and SqlConnection.
- FoxPro does not support the .NET light weight transactions, so code to custom manage the transaction could be deleted and a simple 'using( TransactionScope tx = new TransactionScope() )' could be implemented.
- There where several areas where 'adapter.Update(row)' did not work with FoxPro, so the Insert/Update/Delete had to be called manually in the data access layer. With SQL Server there are no problems and this 'fix-it' code could be removed.
After following these steps some of the datatables would generate unexplicable validation errors. Not wanting to waste too much time I just re-created those typed tables and re-added the queries on those tables.

Since the advent of cheap web hosting, we have had more development in the field of SEM. Thanks to features like internet phone, managing internet network marketing is a lot more feasible now. Marketing strategies like cpc, ppi and pay per click can be managed with much more comfort now. Usually regular advertising agencies miss out on this since they concentrate more on building links through email marketing.