Next 
I came across a scenario where I wanted to return a custom collection of a model type that was more efficient to build with a stored procedure. It worked great for displaying but not for subsequent editing of the items since the return type collection didn't match the model. To fix this I found you could change the return type of a stored procedure following these steps:
  1. Open edmx model file
  2. Go to model browser view
  3. Expand the Function Imports node
  4. Double click relevant stored procedure
  5. Change return type select to Entities and pick desired model
1.5 years, really?!
28 May 2015

Wow, I've really let this blogging idea slide. I should have been writing more about my coding adventures in the last years. I don't really know where to pickup. I blame it on having 3 kids keeping me busy. As soon as I get home they're begging me to wrestle or play with them. I try to oblige most of the time. But I'm not complaining, I love my kids.

Life is more important than blogging, right?

I have started working with Oracle and I was recently tasked with importing a data pump export to a different schema. Once all the required roles were created and the correct REMAP_SCHEMA option was sorted out* I was left with one interesting problem. Everything remapped properly except triggers. The trigger name was remapped correctly but the target table still referenced the old schema.

Failing sql is: CREATE TRIGGER "NEW_SCHEMA"."TRIGGER_NAME" BEFORE INSERT ON OLD_SCHEMA.TRIGGER_NAME ...

I'm surprised that something this obvious would go unfixed.

**note Multiple schema remaps are done as follows:

REMAP_SCHEMA=(OLD_SCHEMA1:NEW_SCHEMA1,OLD_SCHEMA2:NEW_SCHEMA2)
Ok, I know Microsoft isn't big on following laid out standards, but it doesn't stop it from causing headaches. Today I found out that a simple column rename in SQL server is not possible with standard, well documented SQL. alter table tablename change oldname newname varchar (10); Instead I have to use some sort of SQL Server procedure sp_rename sp_rename 'TableName.ColumnName', 'NewColumnName', 'COLUMN'

Tags


Fatal error: Uncaught Error: Undefined constant "Math" in /home/sgreimer/stevenreimer.com/includes/classes/TagCloud.class.php:188 Stack trace: #0 /home/sgreimer/stevenreimer.com/templates/_includes/sidebar.php(52): TagCloud->showCloud() #1 /home/sgreimer/stevenreimer.com/templates/index.tpl.php(25): include('/home/sgreimer/...') #2 /home/sgreimer/stevenreimer.com/includes/Page.class.php(412): include('/home/sgreimer/...') #3 /home/sgreimer/stevenreimer.com/public_html/index.php(25): Page->show() #4 {main} thrown in /home/sgreimer/stevenreimer.com/includes/classes/TagCloud.class.php on line 188