• 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

accessing maxdb database from wsad

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi everbody,
i am trying to connect to maxdb database from wsad using jdbc. can you tell me how i can do so.
thanks in advance
satish
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You need to create a datasource with the connection information for that db. There are a bunch of samples for other databases like db2 and Oracle.
 
satish rn
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi Jeanne,
thanks for the reply. i got the driver name to be given in the Class.forName(---) to connect to the database. but i am not able to instantiate the database. i installed maxdb on windows 2000. can you tell me how to start the database and create some tables there. In short, i would like to know the command to connect to connect to the database
thanks
satish
 
Jeanne Boyarsky
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Satish,
It looks like you are using plain JDBC (not a datasource) so your question isn't specific to WSAD. Starting the database should be explained in the instructions for your database. To access it, you should be able to use pure JDBC.
You may want to post your code that isn't working. (it would probably get a better response in the jdbc forum)
 
satish rn
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi jeanne,
this is the code i am using to connect to the database. the error i get using the code is because of the getConnection statement because, i donot have the maxdb database instantiated and there is no database named whistleblower in it. i would like to know how to instantiate maxdb database and create tables in it. i have installed the maxdb database from mysql.
thanks
satish
import java.sql.*;
public class TestClass2 {
public static void main(String [] args)
{
Connection con= null;
Statement stmt = null;
ResultSet rs = null;
ResultSet rs1 = null;
String username;
String password;
try
{
System.out.println("hi");
Class.forName("com.sap.dbtech.jdbc.DriverSapDB");
System.out.println("hello");
con =
DriverManager.getConnection("jdbc:sapdb://localhost/whistleblower");
}
catch(Exception e)
{
System.out.println(" hi " + e.getMessage());
}
}
}
 
Jeanne Boyarsky
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I get it now. Your question isn't really about java. JDBC assumes that you have everything set up. You need to create the whistleblower database by hand. You can do this through the command line or any gui tools provided by your database.
 
Alas, poor Yorick, he knew this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic