wood burning stoves 2.0*
The moose likes JDBC and the fly likes Invalid Object Name Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Invalid Object Name" Watch "Invalid Object Name" New topic
Author

Invalid Object Name

Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Hello
I am working on a web application which involves MS SQL Server 7.0 at the backend.
I am also using the jdbc-odbc bridge to connect to the database.
The database has a table called PersonalProfile.
The JSP goes like this : -
<HTML>
<TITLE>Data Base testing</TITLE>
<BODY>
This is the list of employees
<%@ page import="java.sql.*, java.util.*, java.net.*, java.io.*" %>
<% Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");<br /> String url = "jdbc dbc:dbEIS";<br /> String user=null;<br /> String password = null;<br /> Connection con = DriverManager.getConnection(url, user, password);<br /> Statement stmt = con.createStatement();<br /> String Query = "Select FirstName from Administrator.PersonalProfile";<br /> <br /> ResultSet rs = stmt.executeQuery(Query);<br /> while (rs.next()) {<br /> %>
<%= rs.getString(1); %>



<% } %>
</BODY>
</HTML>
This is giving me an error that "Invalid Object Name PersonalProfile". I have checked that there is a table called PersonalProfile in the database dbEIS.
Please help me. I am stuck.
Dmitri
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Invalid Object Name