• 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

SQLWarning

 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
i wrote a small program which uses jdbc to connect to the sybase database. The driver got loaded successfully.
Class.forName("com.sybase.jdbc2.jdbc.SybDriver");
Then i tried to get connected to the database.
Connection con = DriverManager.getConnection( "jdbc:sybase:Tds:10.1.0.36:4100/trexdev", "mxc", "trx123");
I get an SQLException which says
" sql warning JZ00L: Login failed. Examine the SQLWarnings chained to this exception for the reason(s). "
Can anyone tell me how to get the SQLWarnings for the exception.
i am able to connect to the database with the same login in another program but not this, why?
Thanks in advance
Madhuri
 
Wanderer
Posts: 18671
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Use the "Search" facility (look towards upper right area of this screen) and search for "SQLWarning" or "SQL warning". Or consult the Java API for SQLWarning.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic