#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2001
    Location
    Brazil
    Posts
    0
    Rep Power
    0

    Question Ultradev4 JSP Tutorial help


    Hi everybody!

    Im new to JSP and Im trying to use DreamWeaver Ultradev 4 to start. Im using its tutorial JSP site.

    SYSTEM

    -Windows 2000
    -Tomcat and JDK installed

    PROBLEM:

    -After making the *.war file (with all the files in my directory) I can access the search page, but when I try to make a search I get the following error message:

    Error: 500
    Location: /test/Results.jsp
    Internal Servlet Error:

    javax.servlet.ServletException: [Microsoft][ODBC Driver Manager] Invalid cursor state
    ... a lot of at apache........;at apache.........;at apache......

    Can someone tell me whats happening????
    Whats the solution????
    Who killed Mr. Burns???

    Thanks for reading!
    Many thanks for any help!

    Ricardo Luis de Oliveira Molero
    São Paulo, Brazil
    ricardomolero@hotmail.com

    Comments on this post

    • JimmyGosling agrees
  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2001
    Location
    Rep. of Ireland
    Posts
    2
    Rep Power
    0
    Your problem is with the database your using,

    javax.servlet.ServletException: [Microsoft][ODBC Driver Manager] Invalid cursor state
    ... a lot of at apache........;at apache.........;at apache......


    An invalid cursor state usually indicates a problem on your result set.

    A typical example would be not using the next() function of the result set to get into the actual data.

    When you query a database it(usually) returns a resultset. Initally the cursor is not pointing to the first record in the database. Therefore you use next() to enter into the records.
    It looks something like this:

    PHP Code:
    <%
    Connection conn;
    ResultSet results;
    String url "jdbc: odbc: Personal";
    String username "DEMO";
    String password "DEMO";
    try
    {
    // Initiate the JDBC-ODBC Driver
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

    // Connect to the ODBC Source
    conn=DriverManager.getConnection(url,username,password);

    Statement smt=conn.createStatement();

    results=smt.executeQuery("SELECT * FROM fuser");

    results.next();
    %> 
    It may be something more subtle however, if you can post some code, somone will be able to point out exactly where your error is.

    Hope this helps.

    Comments on this post

    • JimmyGosling agrees

IMN logo majestic logo threadwatch logo seochat tools logo