I looking for a best way to migrate a Windows Forms application from MS SQL Server to Oracle. The table schema is recreated in oracle allready and the data was copied into Oracle tables. The App uses ADO.NET Datasets to access the DB. So, should I just kind of replace all references to SqlDataAdapter with OracleDataAdapter, SqlConnection with OracleConnection etc. in the autogenerated DataTableAdapters code, or is there is some other way to make the existing dataaccess code work with Oracle?
Asked
Active
Viewed 264 times
1
-
Sounds like you're working on a poorly designed solution, but essentially what you're proposing is correct. If you have time to, you should probably refactor this application to use a data access layer and data objects. – immutabl Oct 26 '11 at 11:56
-
Let me just say now I feel sorry for you. Working with Oracle and .net is going to be a lot more difficult than keeping the app on SQL. Is this an app you are releasing to others to use (internal or external customers)? If so do you have to support the oracle piece (client software) as well as the app? You my friend are in for a difficult journey. 1. Implementation and support is difficult, 2. Rewriting the app will prove cumbersome (queries will most likely have to change a bit), etc. – tsells Oct 27 '11 at 02:06
1 Answers
0
Have a look at my answer here: MVC3 and Entity Framework
in fact this logic of layering and separation of concerns applies to MVC, WinForms, WPF, SL and so on... in such layered stack only the DAL (Data Access Layer) is impacted and needs to be updated, everything else stays the same.
my suggestion is to make such DAL class library separated from anything else and in there, as you mentioned, you should replace SqlConnection
and SqlCommand
with the Oracle ones.

Community
- 1
- 1

Davide Piras
- 43,984
- 10
- 98
- 147
-
Depending on the way the app was designed he may not have a separate data layer. Moving this out and providing proper transaction support may make it not worth doing at all..... – tsells Oct 27 '11 at 02:08
-
It depends on the way the DAL is done but in my opinion is worth unless the application is just a little toy. – Davide Piras Oct 27 '11 at 05:55
-
thanks. the DAL is separated already, the queries are essentially simple CRUD stuff, so I'll just give it a try :) – Alexander Bruk Oct 27 '11 at 12:57