• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Loading Driver automatically

 
faisal hameed
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using sql DataBase.I create connection using the following code.How can i load driver automatically without makin DSN in DataSources(ODBC).And how can i use my table in my Project Folder instead of in Sql folder, where i install sql server.

 
Ashwin Bangar
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Faisal,
You are using Type-1 Driver for JDBC connection, instead of that try to use thin driver i.e. Type-3 driver. in that you have to specify the "vendor related url".
One more thing is that you are using sql, what does that mean, MS-Sql server or MySql or Oracle or something else...
so depending on the Sql you are using you have to specify the url in
String conURL = "jdbc:Odbc:dBServlet";


 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic