How to get the data for the Autocomplete from the list dynamically.

How to get the data for the Autocomplete from the list dynamically.

Hi,

I am trying to implement the JQuery UI autocomplete feature in this following way:
#1 I need to load the data from the database to the list on page load event.
#2 load the values from the list to autocomplete source data.

Any idea, how to do this?
I am having an application with this feature, but it is getting source data from the database on every search operation on the autocomplete box.

Thanks,
DIP.