Please have a look at the following sentences:
Lustlos suchte ich der Oma ihre Brille.
Lustlos gab ich der Oma ihre Brille.
der Oma dative case and
ihre Brille accusative case in both sentences - or are there differences?
[der Oma ihre Brille] is the accusative argument of
suchte as a whole. Internal it is composed out of the optional
der Oma ihre-adjunct and the phrase's head
Der Oma ihre however is a non-standard expression to encode possessive; the stilistically more appropiate way is to use genitive:
Lustlos suchte ich [[Omas] Brille]
The possessive as in your example, however is indeed a dative constuction.
In your second example,
der Oma ihre do not form a single phrase.
Lustlos gab ich [der Oma] [ihre Brille].
In this sentence
ihre Brille is one argument of the verb geben and
der Oma is another argument. The ihre in this example belongs to accusative argument of the predicate geben. Internally it is constructed out of the head Brille and the adjunct ihre which specifies Brille. You can test this by substituting the
Lustlos gab ich der Oma seine Brille.
This sentence is completely grammatical, although is has a completely different meaning: It cannot be the glasses of
Oma but the glasses of another (probably male) reference person that is not directly named in this very sentence.
This test will fail with your other example:
*Lustlos suchte ich der Oma seine Brille
You can try another test by substituing der Oma ihre by the article
Lustlos suchte ich die Brille
*Lustlos gab ich die Brille
You see that there are two completely different syntactic structures behind both sentences, therefore they are not the same case, strictly spoken.