Hello, i need to have my phone sync with a server database. Can I use activesync to grab my exchange server certificate and do the rest that way?

I was thinking I can have it sync when my exchange server syncs my phone.

Or

I might want to have an option to sync right upon writing to the DB on my Phone.

How can I do this?

I know what i need to have installed and what not. I need to know where to start programmatically.

I am not going to use a web service. I will be using a straight connection to the server DB. or the Server APP I make then have that save to the DB.