Thursday, January 6, 2011

ORA-04068: existing state of packages has been discarded

Everythings right but you still see:

ORA-04068: existing state of packages has been discarded
ORA-04061: existing state of package "PKG.PROC" has been invalidated
ORA-04065: not executed, altered or dropped package "PKG.PROC"
ORA-06508: PL/SQL: could not find program unit being called


My dataset points to a stored procedure. The stored proc
executed just fine when kicked off from the database.
It even worked fine when I tested it from Query Designer
within SSRS.

What worked for me is to just close and reopen my
MS Visual Studio IDE.
This post says to log out and log back in.
But I work in a version controlled environment
where I would need to check out all the datasources I needed
trouble fellow teammates to check them in so I could do so!
I just decided to kill my IDE instead :)

Tuesday, November 23, 2010

SSRS ora-01036 Error

It destroys time!
If you are connecting to an Oracle database :
In your query, get rid of the quotes for the parameter names. Next, replace the '@' with a ':' and preview the report. It should work.
The reason is that Oracle does not understand that parameters begin with '@' . For Oracle, parameters are prepended with a ':' while SSRS understands it the other way round.
So when you try and run the query through the SSRS Query Designer by hitting the '!' in the toolbar, you should probably expect an error message from SSRS. But your report with work fine nevertheless. I haven't found a way around this i.e. keeping both, the database and SSRS from whining, but if you do, please comment on this post since I'm very new at this!

Thursday, July 2, 2009

IE: Javascript Hitches, Glitches and More!

My last two days in the Laboratory have been about tweaking Javascript so that Internet Explorer understands it. When web programming, rest assured that IE will behave like a juvenile delinquent and demand special treatment; and you my dear, will have to succumb.
But lets not get you more wound up than you already are - with the world of blogs and wikis, you will find your way :)

Here is some of the stuff that I picked up along this odyssey(thats not yet over btw.). I've been foraging for 2 days and I wouldn't want you to do the same!

  • InnerHTML - If you want to say dynamically expand an option list by simply appending to existing innerHTML using += ; IE won't let you. You need to explicitly use a createElement as shown:
var opt = document.createElement("OPTION");
opt.value = "some text"; //use setAttribute
opt.appendChild(document.createTextNode("some text"));
opt.selected = true;

  • The text for an option - notice the
    opt.appendChild(document.createTextNode("some text"));
    line above. If you had simply done
    opt.text= "some text" ;
    IE would have whined.
  • http://www.berniecode.com/blog/2007/03/08/how-to-debug-javascript-with-visual-web-developer-express/ explains how to get a decent debugger running for IE for free! Note: If IE is not set as your default browser, no worries and donot change that setting because IE is not worth it. Just read the comments below the post in the link above.
  • http://www.quirksmode.org/dom/w3c_core.html gives a browser wide comparison of certain Javascript methods and how each browser accounts for them.
  • File uploads in IE - They will fail. :) But not if you set both properties 'enctype' as well as 'encoding' to "multipart/form-data".
Well have a blast! There's probably more coming up since I forsee a lot of IE damage control that I need to do in the next few days.

Saturday, November 29, 2008

completely out of context of this blog - SUPPORT ARUN BHATIA

I'm taking advantage of the decent reader-ship here.
Please support Arun Bhatia.
Facebookers, in the midst of playing Facebook Pictionary or Super Mario or uploading pics or updating status messages, Please look at

http://www.facebook.com/pages/Arun-Bhatia/35983964025?ref=nf#/pages/Arun-Bhatia/35983964025?ref=mf



I Support Arun Bhatia- http://www.arunbhatiaelect.com/

Cheers to a ray of hope,
Shalini

Friday, November 14, 2008

Complete Context Switch...

Its been even longer :)
I love the rollercoaster of Life! Its landed me from being an IT professional in India to a Graduate Student in the United States.

This is not a highly technical post. Its just about some of the interesting stuff I'm doing as a Grad Student.

Well for one its my Computer Architecture Course. Its a challenging one and I'm learning a lot. I never thought i'd be this interested in processors! Dr. Tyson, makes learing fun!

Our first assignment was to simulate a pipeline in C. This was a 5 Stage pipeline that accounted for data hazards by detection and forwarding and for control hazards by using a G-Share branch predictor. See now a few months back when I was busy writing webapps, this would have sounded Martian to me :)

The second assignment, which I'm still submitting, and re-submitting... and probably will be doing till the very end is not unlike the chaos involved in the rollercoaster of life! Its an out of order exection pipeline, like that of the Pentium pro which means although Instructions are issued and retired in program order, they could be scheduled and executed in any order. There is an Interim stage which renames instructions so as to take care of data hazards.

Its an enriching experience!

Tuesday, April 1, 2008

Tagging with has_many_polymorphs

In using HMP earlier, i had discovered that putting the require
statement before the Rails Initializer block gives you a nil error which
is fixed if you shift the require beneath the Rails Initializer block. Then, doing a
>ruby script/generate tagging [model names...]

fires a Couldn't find 'tagging' generator. So i shifted it back up.

Next I wanted to use the Tagging functionality of HMP. I decided to try in on a fresh application so I followed this tutorial
http://blog.evanweaver.com/files/doc/fauna/has_many_polymorphs/files/README.html
which is a very nice step by step guide.

But i constantly got a 'Could not find tagging generator' error message when I tried a

>ruby script/generate tagging ModelName

I uninstalled the Gem and Installed the plugin which I downloaded from http://webscripts.softpedia.com/script/Internet-Browsers-C-C/has-many-polymorphs-17691.html

but the error still remained.

Finally i wrote to the creator of this plugin, Evan
and put it up on RubyForge

It turned out that the Plugin was really old and I needed a newer version (follow the forum link). [being behind a firewall is really a pathetic situation...]

This got rid of the 'Could not find Tagging generator' error. I went on to try tagging my Models by doing

>ruby script/generate tagging ModelName

which generated a bunch of files and a migration script. Be sure to do a
>rake db:migrate
before you run any tagging related code (even on the ruby console obviously!) unless you want a "Model Cannot be tagged" error. Someone put this too up on Rubyforge.

Now I can successfully Tag my models.




Friday, March 7, 2008

Eager and Lazy Loading in Rails


How do you control how much data you want to be loaded from database
when you have your objects tied up with Rails Associations?



For Instance, in the Social Networking Context, I need to show just a few of a
person's friends on his home page and provide a see all link which
takes him to a page which then shows all, possibly with pagination.


Eager Loading :



http://api.rubyonrails.com/classes/ActiveRecord/Associations/ClassMethods.html



http://matthewman.net/2007/01/04/eager-loading-objects-in-a-rails-has_many-through-association/



http://www.travisonrails.com/2007/02/18/Rails-eager-loading-of-associations



http://www.theserverside.com/tt/articles/article.tss?l=RailsHibernate



Lazy Loading :



http://weblogs.asp.net/fbouma/archive/2007/04/16/more-on-lazy-loading-vs-pre-loading-in-o-r-mapping-scenarios.aspx



http://ayende.com/Blog/archive/2007/04/15/Lazy-loading-The-Good-The-Bad-And-The-Evil-Witch.aspx



When you have an object associated with many objects like a User has
many Friends and you want to display a list as in Orkut you fire as
many queries as there are friends, plus one for the object itself.



To load all the relevant data at once it is better to use the :include option.



user = User.find(:all, :include=> :friends) to find all users with friends in a single query.

Different variations of the find call can be used.

An approach is to write a method in your model for User which makes this query and invoke that from your controller. To make this method reusable, you can make it expect a parameter which indicates how many friends to load, but set the default value to 0 so that if nothing is passed, you can expect to load :all.

Hence the same method is invoked in the action which populates both views - the semi list as well as the full list.

Kapish?