Spider Climb says "The affected creature must have its hands free to climb in this manner". You need one hand free to cast a spell with somatic components. Are the hands you're using for Spider Climb no longer "free"? It seems to me like if you're crawling along the wall/cieling/whatever you must take at least one hand off the surface sometimes to move.
On the other hand, maybe the rules don't take that into account. They also don't mention what happens if the affected creature stops having its hands free. Does it fall off the cieling, or is it just unable to move? If somebody tricked you into accepting an object would you fall?