You need to sign in to do that
Don't have an account?
Querying data from outside sources
Hi,
i am attempting to have a page in which the user can query some datasets from other databases using user/pass. The old code that was working on another site uses stuff like
conn1 = DriverManager.getConnection(dbUrl, userName, pwd);
stmt = conn1.createStatement();
rs = stmt.executeQuery("");
And so on. Is there a way to use this same stuff on a visualforce page? If so, how do I import the java.sql and so on onto the apex class?
Or does salesforce have it's own way of connecting to stuff like this?
I am pretty new to this side of development, so any help is good.
Thanks!
You can't use the Java SQL classes in Visualforce. You can consume web services or make HTTP callouts, so your external system would need to support one of these interfaces. Or you could always set up some integration to replicate the data from the external system in to Salesforce.
All Answers
You can't use the Java SQL classes in Visualforce. You can consume web services or make HTTP callouts, so your external system would need to support one of these interfaces. Or you could always set up some integration to replicate the data from the external system in to Salesforce.