import java.io.*;
import java.sql.*;
import java.net.*;
public class sqlDemo
{
int eno;
ResultSet rs;
ResultSetMetaData md;
String /*insq,*/ selq;
Statement stmt;
public sqlDemo()
{
try
{
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
Connection con=DriverManager.getConnection("jdbc:microsoft:sqlserver; DatabaseName= Admin.sdf", "sa", "deepa#247");
//BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
//System.out.println("Enter Employee id");
//eno=Integer.parseInt(br.readLine());
stmt=con.createStatement();
selq="select * from emp";
//insq="insert into emp values(?,?,?)";
//int j=stmt.executeUpdate(insq);
//System.out.println("No of rows inserted \t" +j);
rs=stmt.executeQuery(selq);
md=rs.getMetaData();
int col=md.getColumnCount();
while(rs.next())
{
for(int i=0; i <= col; i++)
{
System.out.print(rs.getString(i) + "\t");
//rs.next();
}
System.out.println();
}
rs.close();
stmt.close();
con.close();
}
catch(Exception e)
{
System.out.println("Exception \t" +e.getMessage());
}
}
public static void main(String args[]) throws Exception
{
new sqlDemo();
}
}
there are no errors in this program but wen i execute it an exception is raised at "com.microsoft.jdbc.sqlserver.SQLServerDriver"
Please help me.....