I don't agree with the answer below as you would dehydrate if you don't drink anything for 24 hours.
Drinking isn't a problem after a dental filling, unless you have had a fluoride treatment, where you would have to wait 30 minutes before putting anything in your mouth.
If you have had a silver filling done, it is recommended not to eat anything for an hour, and not to eat anything hard (cancy, nuts) for 24 hours.
If you have had a white filling done, you can eat right away because the fillings are hard instantly. Put in mind that you might be numb for a few hours after the treatment if you have had local anesthesia. And also, you teeth might be sensitive to cold for a few days.
depends on the type of filling. Usually to be safe 24 Hrs. on either one should be okay.