Frustrations Abound

by trdunsworth

I’ve read the start of the quote, “These are the days which try men’s souls,” and have now found a way to certainly apply that in my career. I’m trying to re-build some vintage ASP VB6 sites. Currently, I’ve cleaned them up and made them workable, except for one page because the Oracle back end for that table uses a CLOB data type and VB6/ASP can’t handle CLOBs.

What I really want to do is use MVC 4, Entity Framework, and ODP.NET to create something workable and aimed toward being there in the long run. (Basically, I don’t want to have to do a major re-write in 3 years when the database is switched from Oracle to SQL Server and it all becomes easier.) Therein lies the problem. Wiring up 2 of the 3 components isn’t difficult. I can get EF and MVC4 to work well as I can get EF and ODP.NET to play nice, but add in all three and I feel like I’m in uncharted territory. So I’m going to start blogging and documenting what I’m discovering in hopes that someone else might have some info (if anyone else reads this) and can help me find the pieces I’m missing, or will be able to follow my trail into this and hopefully get something productive out of my morass.

I can do the first part on this rig. (I have two rigs I work out of, one faces the world and the other faces a private subnet that doesn’t have outside access.) So I create an MVC4 project and ensure the latest jQuery, ODP.NET, and EF are all part of the puzzle. I have some ideas of the different controllers and models I’m going to need on the first project. It’s the administration piece which will access existing data tables for a program which monitors events as they happen and sends notification emails to subscribers based on agency, call type, and/or the number of responding units. (There is also a portion for notifications based on the address of the event). So I need to administer the subscribers, the locations, and the call types. The subscribers need to be administered overall, but need to also be filtered by the agency to whom they “belong” as well as the agencies to which they subscribe. The locations need to be administered overall and certain groups of locations need to be gathered together for supervisors to monitor. The call types and subtypes need to be administered to determine when we need to make changes to automatic emails. Plus I have a couple of data grids which show what’s in the pipeline being evaluated and what has been sent out to subscribers. Overall, this shouldn’t be hard. I have 3 CRUD areas and a couple of simple dataset queries. Again, this isn’t rocket science. I already have the tables in place, so I don’t need Code First, I need Database First.

I can connect to the database on the second rig and when I create the project,  I create it on the second rig (from the first one) so there won’t be any problems with it pulling up and being able to code. I can edit the web.config file so I can connect to the Oracle DB. (I’ve gotten decent at that) and I know the queries I need at each stage. I should be able to put all of this together easily, but I’m just not making the last connections to link MVC4 through EF to ODP.NET to reach the DB in a meaningful CRUD environment.

Well, more later…..