+ Start a Discussion
md1md1 

Sending or Exporting data from Apex code to Oracle (or any of the other common ODBC/JDBC based) database

IS it possible to send a record or a set of records to a database from Apex code; as a simple example, when a record gets updated in SFDC, the same is 'upserted' in the database of choice? Or do we have to write a hosted application using the Web services API for the same?

Any ideas on this are welcome as its an urgent requirement.

Thanks in advance,
-MD!

Message Edited by md1 on 01-08-2009 03:39 PM
aalbertaalbert
If you are looking to send a message from SFDC to your database upon update in real-time, look into using Outbound Messaging which is part of workflow. It will still require you to host an endpoint to receive the soap msg pushed by salesforce.

Or a more simple, rudimentary approach could be to use the data loader and configure it to connect to your DB. And you can run the data loader in a scheduled manner since its a client application that would run on your servers and poll for salesforce.com data.


md1md1
Exactly my point, Albert! ...... so it cannot be done without having a 'hosted' solution - either an 'end-point' or an app that runs on a scheduled basis?

I believe a number of people would be interested to know if this is not possible now, is it somwhere on the roadmap as it would make a number of integrations much easier and the concept of PaaS more acceptable.
aalbertaalbert
There are many middleware vendors (such as Informatica or Tibco amongst other smaller ones too) that provide these types of solutions. Informatica even has their version of "data loader on demand". You might look into that. It won't require you to host anything.
werewolfwerewolf
There's also this ODBC driver:

http://www.openaccesssoftware.com/products/openrda/salesforce_overview.asp

I can't vouch for it though as I haven't tried it.
werewolfwerewolf
But generally, no, Salesforce.com can't just insert stuff into your database, and with good reason -- people don't usually open SQL access to their database to stuff outside their firewall.  They usually want to box that into a specific service -- that's what Tibco & CastIron & Pervasive and all do.