• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Connection Problem

 
Rajeev Asthana
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have created a database DEV and its URL is: jdbc ointBase EV.

I then added pbembedded.jar in CLASSPATH Suffix in JVM tab in Admin Console.

I also created a JNDI entry as jdbc/dev.

Then I created a table USER_SALARY in the schema PBPUBLIC.

I want to use the table in my Session Bean to insert rows in this table.

I specified it as:

...
ds = (DataSource)ctx.lookup("jdbc/dev");
conn = ds.getConnection();
pstmt = conn.prepareStatement("INSERT INTO PBPUBLIC.USER_SALARY (USER_NAME, SALARY) VALUES(?,?)");

pstmt.setString(1, userName);
pstmt.setDouble(2, (initialSalary*1.25));


updatecount = pstmt.executeUpdate();

.....

When I run the programs, I see that there is an error message in the server.log file:
"....table USER_SALARY is not found...."

What could be the error?

Any help is appreciated.

Thanks,
Rajeev.
 
Jyothi Lature
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try creating a synonym on the object and granting insert right to it...
 
Rajeev Asthana
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Jyothi Lature:
Try creating a synonym on the object and granting insert right to it...


I was trying all this in J2EE 1.4 SDK. I thought it'll take care of it.
Thanks for the suggestion.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic