i got it.i wasnt using Class.forName(driver);that means i wasnt loading the driver.i would like to know whether it right way to use class.forname() in BMPor any other way i mean better way to connect to database.