I have created a remote sql server 2005 database.
I need to get some data from it. How can I do this?
I would be glad if you gave me the code and tell me where I need to insert each thing (like username, password, sever etc.)
Thank you and have a good day!
Ron
I have created a remote sql server 2005 database. I need to get some
Share
I suggest you use the features of the standard library in the package java.sql. The DriverManager should have what you need. An example of a connection could look something like this (depending on what driver you use – replace the “com.mysql.jdbc.Driver” with the driver you need):
.. Just as an example. See more examples in java2s. Particularly under DriverManager and [ResultSet4.