I am starting to learn java in particular creating web applications so i am a newbie @ this. Ok I need to create a connection to SQL Database in my
application, Using Netbeans 5 i downloaded the jdbc drivers installed and all is working fine, Problem comes when i need to create a connection in my app
Can someone plz post some code so i can see how it suppose to done. I did
get examples from the web.
Code: Select all
class DConnection {
public static void main(String[] args) {
try {
DriverManager.registerDriver(
new com.microsoft.sqlserver.jdbc.SQLServerDriver());
//In this line i get Package not found
Connection connection = DriverManager.getConnection("jdbc:microsoft:sqlserver://PIAPE","sa","*****");
thanks in advance