Is xylocaine (lidocaine) oral solution good for a toothache?

Temporally . Minimally effective and temporally due to wash out by saliva. Try to see dentist for addressing underlining problem.
Limited use . Topical anesthetics will only work to relieve tooth pain if exposed nerve or internal tooth structure is in contact with topical medication. Even then it is easily washed away by saliva and therefore should only be used as a temporary and emergency method until you see a dentist.
Yes. Temporarily. If the problem is due to nerve involvement , xylocaine (lidocaine) is only temporarily numbing the tooth until the problem can be evaluated by a dentist.
Could be. Viscous Lidocaine is used to relieve pain and discomfort from a sore throat/mouth. It is also used to numb the lining of the mouth and throat before certain medical/dental procedures (e.g., dental impressions).
No most of the time . Most toothaches are pulpal in nature and oral xylocaine (lidocaine) can't get to the source of this problem. If the ache is an ulcer, localized gum problem, or something else superficial, then it could help a little.