• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Can't connect to remote sql server

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I wrote a simple progam to connect to an sql server database and run a query but i'm getting an error "Exception in thread main Java.sql.sqlexception: No suitable driver. can anyone help me out. or do i have to create an odbc connection and use it for connecting to the sql server?
 
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please include your database connection code especially the driver and connection url you are trying to use and which kind of database it is (Oracle, MS Access, mySql, Db2, etc).
 
Ranch Hand
Posts: 275
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I assumed you are using oracle type 4 jdbc driver.
You simply put classes12.zip or classes111.zip in you classpath and in some you have to rename this zip file to jar file and it will work.
Hope it helps.
 
James Ajewole
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i'm trying to connect to sql server and im using the connection string that goes like this
"jdbc:microsoft:sqlserver://<servername>:1433"
do i need to download a special driver?
 
reply
    Bookmark Topic Watch Topic
  • New Topic