Help!

hungnx

New Member
I tried to write a simple java app to connect, retrieve data from a Progress Database.I have connected to the database but have some problems need helps.
1.I used 'data administrator' + 'data dictionary' to create database + table and 'Procedure editor' to insert data (Test db, Customer table). Create an account id:test, user:test, pass:test
2.Start the database in the port 4000 from Command Prompt:
proserve Test -S 4000
3.And use the followed code to the Test database from java
String url= new String("jdbc:jdbcprogress:T:localhost:4000:test");
Connection con= null;
try{
Class.forName ("com.progress.sql.jdbc.JdbcProgressDriver");
}catch(Exception e1){
System.out.println("Load driver failed");
}
try{
con = DriverManager.getConnection ( url, user, pass);
}catch(Exception e2){
System.out.println("Established connection failed");
}

I connected to the database but cann't retrieved any data from it. An error is occured : 'The table was not found' :mad:. What's this problem?

Thanks.
 
you didn't specify your progress version but anyway I think it's higher than 8.

Instead of 'test' account you should have created 'sysprogress' account with non-empty password and used it to connect. 'sysprogress' is a single user which can be created from 4gl side and have access to SQL side which ODBC & JDBC drivers rely on.

HTH
 
you didn't specify your progress version but anyway I think it's higher than 8.

Instead of 'test' account you should have created 'sysprogress' account with non-empty password and used it to connect. 'sysprogress' is a single user which can be created from 4gl side and have access to SQL side which ODBC & JDBC drivers rely on.

HTH
I'm new comer :o
I still don't retrieve data from my Test Db.
Can you point me steps to creat a database (include : tables, fields, ...).
And how to use java to connect and retrieve data from it.
Thanks so much!
 
Can you point me steps to creat a database (include : tables, fields, ...).
And how to use java to connect and retrieve data from it.

First question, what do you want to achieve?
You want to learn how to create your own db or you want to connect to the existing db via jdbc?

As I understand you've already created a db, haven't you? All you have to do is to create a new user 'sysprogress' and assign password to it. After that you have to start your db using proserve script with -S parameter. If db is started you'll be able to test your SQL connection using SQL Explorer tool in OpenEdge program group. Fill fields in the connection dialog as follows
Host - host where your db is started (localhost for local started db)
Port - the value of -S parameter
Database - your db name
User - sysprogress
Password - sysprogress' password

If you're connected to your db you can try to do that from java.

HTH
 
hi, hungnx.

to workaround the 'The table was not found' try putting PUB. before the table name

Example:

Select * from PUB.Customer;

By default the only user who has total access to the data in SQL
is the user who created the DB or the one who has DBA Access.

You can use this statement to know which user has DBA Access.

SELECT * FROM sysprogress.sysdbauth;

You then can use this user to grant access to whoever you need.
 
Back
Top