Hey ranchar in the above code i am getting the exception as Invalide object name 'Author'. But why all ready there is a table author in pubs. what is the cause of this exception. I think DSN is not connecting with the pubs database.
Your code chunk seems to be perfect.Check with your table name. It makes a difference between "author" and "Author" if your OS is Red Hat Linux. Also check whether you have the proper jar file in your class path.