Who can help me?I have a question about JDBC with SQL Server 2000.

import java.sql.*;
import java.util.*;
public class sqltest{
static public void main(String args[]){
try{
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
}catch(Exception e){
e.printStackTrace();
return;
try{
Connection conn=DriverManager.getConnection("jdbc:microsoft:sqlserver://CE800:1181;UseDatabaseName=supermarket;user=sa;Password=");
Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery("select * from customers");
while(rs.next()){
System.out.println(rs.getString("username"));
conn.close();
}catch(Exception e){
e.printStackTrace();
return;
when I run it,error occured:
D:\MyJava\sql>java sqltest
java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Invalid object name 'customers'.
at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source)
at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processErrorToken(Unknown Source)
at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processReplyToken(Unknown Source)
at com.microsoft.jdbc.sqlserver.tds.TDSExecuteRequest.processReplyToken(Unknown Source)
at com.microsoft.jdbc.sqlserver.tds.TDSRequest.processReply(Unknown Source)
at com.microsoft.jdbc.sqlserver.SQLServerImplStatement.getNextResultType(Unknown Source)
at com.microsoft.jdbc.base.BaseStatement.commonTransitionToState(Unknown Source)
at com.microsoft.jdbc.base.BaseStatement.postImplExecute(Unknown Source)
at com.microsoft.jdbc.base.BaseStatement.commonExecute(Unknown Source)
at com.microsoft.jdbc.base.BaseStatement.executeQueryInternal(Unknown Source)
at com.microsoft.jdbc.base.BaseStatement.executeQuery(Unknown Source)
at sqltest.main(sqltest.java:15)
Please help me,thanks a lot!

Your code seems ok, you probably end up in another Database than you expect.
Not sure about the the UseDatabaseName=supermarket clause in your connection string.
You can confirm that get a connection to another database by changing your query to:
SELECT * FROM supermarket.dbo.customers
if this works you probably get a connection to master and should look closer at the UseDatabaseName=supermarket clause.
You did try to run the query in the Query Analyzer i take it?
Rgds

Similar Messages

  • Help me how to set charset UTF-8 in SQL Server 2000

    Hello guys,
    Pls anyone help me out from "how to set the charset UTF-8" in SQL Server 2000.
    How do i find the default charset in that?

    SQL Server 2000 uses UCS-2/UTF-16 encoding.
    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsql2k/html/intlfeaturesinsqlserver2000.asp

  • Some questions about mssqlsystemresource in sql server 2012.

    1,What's the relationship of Location for database Master and mssqlsystemresource  in 2012? based on the following technet article it states
    " If you move the master database, you must also move the Resource database to the
    same location."
    https://msdn.microsoft.com/en-us/library/ms187837(v=sql.110).aspx
    So I moved the master database , however I found if I move the mssqlsystemresource  to the same path as the Master database, then the sqlserver can't start successfully, if keeping the path for mssqlsystemresource to the original path,
    it can start successfully, so what's the means " If you move the master database, you must also move the Resource database to the same location."       
    2,If I want to move the path for mssqlsystemresource  to new path, and make sure the sqlserver can start successfully, how should I do? It doesn't mentioned in the following article.
    https://msdn.microsoft.com/en-us/library/ms190940(v=sql.110).aspx
    Please click the Mark as Answer button if a post solves your problem!

    You did the testing in 2014 or 2012?
    In 2012 (Microsoft SQL Server 2012 - 11.0.5058.0 (X64) , if I move it from "MSSQL11.MSSQLSERVER\MSSQL\Binn" to "Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA" in which contains the Master database ,it would failed and stated"FileMgr::StartLogFiles:
    Operating system error 2(The system cannot find the file specified.) occurred while creating or opening file 'C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\Binn\mssqlsystemresource.ldf'"
    As I already told I id it on 2014 but it would hardly matter. Error message says that it cannot locate the file. Did you properly ran alter database command to move files. Do you want m to create a step by step to show it to you, I can do it but it would take
    a bit of time.
    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it
    My Technet Wiki Article
    MVP
    Hi
    Shanky,
    thank you so much, may I know how to alter the path for mssqlsystemresource ? I tried to run the following, but failed "Database 'mssqlsystemresource' does not exist. Make sure that the
    name is entered correctly."
     ALTER DATABASE mssqlsystemresource MODIFY FILE ( NAME = mssqlsystemresourcedata, FILENAME = 'C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\mssqlsystemresource.MDF' );
    Please click the Mark as Answer button if a post solves your problem!

  • Who can help me to review the question? -"ORA-02019: connection description

    Log error was found in Alert.log file in a DB in our production. It shows "ORA-02019: connection description for remote database not found". I check it and find the RECO process prompt this error message.
    I did the following steps to check the issue:
    1) connect system
    2) SQL> select local_tran_id,global_tran_id,state,mixed,advice,retry_time,os_user,host,db_user from dba_2pc_pending;
    LOCAL_TRAN_ID GLOBAL_TRAN_ID STATE MIX RETRY_TIM OS_USER HOST DB_USER
    8.2.7545 ITOWN01M.US.ORACLE.COM.9ed5378 collecting no 27-SEP-04 oracle DB1 EPORT
    a.8.2.7545
    7.35.9404 ITOWN01M.US.ORACLE.COM.9ed5378 collecting no 27-SEP-04 administrator SZITOWN\SZITOWN-016 EPORT
    a.7.35.9404
    3.47.10637 ITOWN01M.US.ORACLE.COM.9ed5378 collecting no 27-SEP-04 administrator SZITOWN\SZITOWN-016 EPORT
    a.3.47.10637
    1.0.20850 ITOWN01M.US.ORACLE.COM.9ed5378 collecting no 27-SEP-04 administrator SZITOWN\SZITOWN-016 EPORT
    a.1.0.20850
    1.47.21806 ITOWN01M.US.ORACLE.COM.9ed5378 collecting no 27-SEP-04 Administrator WORKGROUP\SZITOWN-013 EPORT
    a.1.47.21806
    3) SQL> select local_tran_id,in_out,database,dbuser_owner,interface,dbid,sess#,branch from dba_2pc_neighbors;
    LOCAL_TRAN_ID IN_ DATABASE DBUSER_OWN I DBID SESS# BRANCH
    8.2.7545 in EPORT N 1 0000
    7.35.9404 in EPORT N 1 0000
    3.47.10637 in EPORT N 1 0000
    1.0.20850 in EPORT N 1 0000
    1.47.21806 in EPORT N 1 0000
    8.2.7545 out CIQUSR_HG.US.ORACLE.COM EPORT N 234c63b2 1 4
    7.35.9404 out CIQUSR_HG.US.ORACLE.COM EPORT N 234c63b2 1 4
    3.47.10637 out CIQUSR_HG.US.ORACLE.COM EPORT N 234c63b2 1 4
    1.0.20850 out CIQUSR_HG.US.ORACLE.COM EPORT N 234c63b2 1 4
    1.47.21806 out CIQUSR_HG.US.ORACLE.COM EPORT N 234c63b2 1 4
    4) I try to commit them by FORCE.
    SQL> commit force '8.2.7545';
    commit force '8.2.7545'
    ERROR at line 1:
    ORA-02058: no prepared transaction found with ID 8.2.7545
    5) It seems no such entry, so I want to purge it.
    SQL> exec dbms_transaction.purge_lost_db_entry('8.2.7545');
    BEGIN dbms_transaction.purge_lost_db_entry('8.2.7545'); END;
    ERROR at line 1:
    ORA-30019: Illegal rollback Segment operation in Automatic Undo mode
    ORA-06512: at "SYS.DBMS_TRANSACTION", line 65
    ORA-06512: at "SYS.DBMS_TRANSACTION", line 85
    ORA-06512: at line 1
    What should I do at the point?? Although the issue do not get any bad effect to current Production, I really hope eveything would be OK.
    Any help from you would be appreciated!!
    Robin

    Hello,
    you have to fix the basic problem,ORA-02019 means your remote database cannot be reached because of an invalid connect string. So it's also impossible to do a COMMIT FORCE,same reason.
    ORA-30019 is due to a bug, document 274321.1 in metalink describes what to do. Here's an extract:
    If you get the following errors while purging transactions using "dbms_transaction.purge_lost_db_entry"
    SQL> EXECUTE DBMS_TRANSACTION.PURGE_LOST_DB_ENTRY('5.23.2386');
    BEGIN DBMS_TRANSACTION.PURGE_LOST_DB_ENTRY('5.23.2386'); END;
    ERROR at line 1:
    ORA-30019: Illegal rollback Segment operation in Automatic Undo mode
    ORA-06512: at "SYS.DBMS_TRANSACTION", line 65
    ORA-06512: at "SYS.DBMS_TRANSACTION", line 85
    ORA-06512: at line 1
    Fix:
    ===
    This problem is logged as
    Bug.2191458 (unpublished) UNABLE TO EXEC DBMS_TRANSACTION.PURGE_LOST_DB_ENTRY WITH AUTO UNDO MANAGEMENT and is worked by development.
    Use the following workaround:
    You have to use local_tran_id.....
    Issue commit before alter system set "_smu_debug_mode" = 4;
    Follow the steps,
    SQL>commit;
    SQL> alter session set "_smu_debug_mode" = 4;
    SQL>execute DBMS_TRANSACTION.PURGE_LOST_DB_ENTRY('local_tran_id');

  • Please help me-I have a question about downloading songs

    I want to have that pop up that says..do you want to keep to file or put to the trash when you delete a song in the library. That pop up doesn't appear and everytime I wish to delete a song I can never send it directly to the trash, I have to do it manually.. thanks in advance..

    I figured it out ! yaya

  • Help!I have a question about the Logminer,want to ask everybody to help.

    Question: Archived redo log not to recoed DML statements, only to record DDL statements.
    问题:归档日志不记录DML,只记录DDL。
    Below is a detailed steps operation:
    下面是详细的操作步骤:
    *1. Install Logminer*
    C:\Workspace\GetFiles\bin sqlplus /nolog
    SQL*Plus: Release 10.2.0.3.0 - Production on 星期二 7月 12 17:11:49 2011
    Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
    SQL> conn / as sysdba
    已连接。
    SQL> @C:\Oracle\product\10.2.0\db_1\RDBMS\ADMIN\dbmslm.sql
    程序包已创建。
    授权成功。
    SQL> @C:\Oracle\product\10.2.0\db_1\RDBMS\ADMIN\dbmslmd.sql
    程序包已创建。
    *2. Set parameter*
    SQL> ALTER SYSTEM SET UTL_FILE_DIR='C:\Oracle\product\10.2.0\db_1\sjjhDict' SCOPE=SPFILE;
    系统已更改。
    *3. Start archivelog*
    SQL> alter database archivelog;
    数据库已更改。
    *4. View archive mode*
    SQL> archive log list
    数据库日志模式 存档模式(archives mode)
    自动存档 启用(activated)
    存档终点 USE_DB_RECOVERY_FILE_DEST
    最早的联机日志序列 10
    下一个存档日志序列 12
    当前日志序列 12
    *5. Create database dict*
    SQL> exec sys.dbms_logmnr_d.build(dictionary_filename=>'C:\Oracle\product\10.2.0\db_1\sjjhDict\sjjhDict.ora',dictionary_location=>'C:\Oracle\product\10.2.0\db_1\sjjhDict');
    PL/SQL procedure successfully completed
    *6. Create table*
    CREATE TABLE "NEWS_B"
    "NID" NUMBER,
    "NTITLE" VARCHAR2(200),
    "NTIME" DATE,
    "NAUTHOR" NUMBER,
    "NCONTENT" VARCHAR2(4000),
    PRIMARY KEY ("NID")
    *7. Insert data to table*
    insert into news_b (NID, NTITLE, NTIME, NAUTHOR, NCONTENT, ROWID)
    values (1, '1', to_date('12-07-2011', 'dd-mm-yyyy'), 1, '1', 'AAAMoiAAEAAAABdAAA');
    insert into news_b (NID, NTITLE, NTIME, NAUTHOR, NCONTENT, ROWID)
    values (2, '2', to_date('12-07-2011', 'dd-mm-yyyy'), 2, '2', 'AAAMoiAAEAAAABdAAB');
    insert into news_b (NID, NTITLE, NTIME, NAUTHOR, NCONTENT, ROWID)
    values (3, '3', to_date('12-07-2011', 'dd-mm-yyyy'), 3, '3', 'AAAMoiAAEAAAABdAAC');
    commit;
    *8. Start logminer*
    Exec sys.dbms_logmnr.add_logfile('C:\Oracle\product\10.2.0\oradata\hux\REDO01.LOG',sys.dbms_logmnr.NEW);
    Exec sys.dbms_logmnr.add_logfile('C:\Oracle\product\10.2.0\oradata\hux\REDO02.LOG',sys.dbms_logmnr.ADDFILE);
    Exec sys.dbms_logmnr.add_logfile('C:\Oracle\product\10.2.0\oradata\hux\REDO03.LOG',sys.dbms_logmnr.ADDFILE);
    Exec sys.dbms_logmnr.start_logmnr(OPTIONS=>SYS.DBMS_LOGMNR.COMMITTED_DATA_ONLY,DictFileName=>'C:\Oracle\product\10.2.0\db_1\sjjhDict\sjjhDict.ora');
    SQL> SELECT SQL_REDO,SQL_UNDO,OPERATION,TIMESTAMP,ROW_ID,SEG_OWNER,SEG_NAME FROM SYS.V_$LOGMNR_CONTENTS WHERE SEG_OWNER='HUX' AND SEG_NAME='NEWS_B';
    SQL_REDO SQL_UNDO OPERATION TIMESTAMP ROW_ID SEG_OWNER SEG_NAME
    DDL 2011/7/12 1 AAAAAAAAAAAAAAAAAB HUX NEWS_B
    CREATE TABLE "NEWS_B"
    "NID" NUMBER,
    "NTITLE" VARCHAR2(200),
    "NTIME" DATE,
    "NAUTHOR" NUMBER,
    "NCONTENT" VARCHAR2(4000),
    PRIMARY KEY ("NID")
    SQL>
    *9. Execute DDL statements*
    SQL> TRUNCATE TABLE NEWS_B;
    Table truncated
    *10. Again*
    SQL> SELECT SQL_REDO,SQL_UNDO,OPERATION,TIMESTAMP,ROW_ID,SEG_OWNER,SEG_NAME FROM SYS.V_$LOGMNR_CONTENTS WHERE SEG_OWNER='HUX' AND SEG_NAME='NEWS_B';
    SQL_REDO SQL_UNDO OPERATION TIMESTAMP ROW_ID SEG_OWNER SEG_NAME
    DDL 2011/7/12 1 AAAAAAAAAAAAAAAAAB HUX NEWS_B
    CREATE TABLE "NEWS_B"
    "NID" NUMBER,
    "NTITLE" VARCHAR2(200),
    "NTIME" DATE,
    "NAUTHOR" NUMBER,
    "NCONTENT" VARCHAR2(4000),
    PRIMARY KEY ("NID")
    DDL 2011/7/12 1 AAAAAAAAAAAAAAAAAB HUX NEWS_B
    TRUNCATE TABLE NEWS_B
    SQL>
    *11. LOGGING status*
    SQL> select logging from dba_tables t where t.table_name=upper('NEWS_B');
    LOGGING
    YES
    SQL>
    Archived redo log not to recoed DML statements, only to record DDL statements. Why?
    Please help me!

    Archived redo log not to recoed DML statements, only to record DDL statements. Why?This simply isn't true. This may be a bug in your unsupported 10.2.0.3, which needs to be upgraded anyway, but it has always worked.
    Also one usually doesn't mine the current open online redologs.
    Sybrand Bakker
    Senior Oracle DBA

  • I have bough Indesign for Mac yesterday and I can't find my serial number any where. Who can help ?

    I have bough Indesign for Mac yesterday and I can't find my serial number any where. Who can help ?

    You have purchased CC, the order is still under transaction
    The CC does not needs any serial number, it is based on Adobe ID.
    In case you are being asked for serial number then you can refer to.
    Creative Cloud applications ask for serial number
    Re: Invalid serial number?
    Regards
    Rajshree

  • DV25/100 MOV file opens in QT but FCP says its invalid. Who can help me find out why?

    We have created DV25 and DV100  MOV files which open perfectly fine in Quicktime, MPEG stream clip and VLC. 29.97 framerate and correct resolution. Yes when I drag into FCP it says its an unknown or invalid file.
    When we drag in other DV25 and DV100 files that FCP has generated during export they work fine in both QT and FCP. We have compared media info using various applications and can find no difference.
    Who can help us find out exactly what is wrong with the file that FCP wont accept it?
    best,
    Tuviah Snyder
    Senior Software Engineer
    Solid State Logic

    If there is a better place to post this question or an Apple engineer we can contact please let me know
    Yeah, this is a user to user FCP support forum, not a developer support forum, so its not really the best place to ask.
    Am assuming you are a registered developer right?  So why not use one of your Technical Support Incidents (or if you've used up your quota already then you can purchase more).
    https://developer.apple.com/programs/mac/support.html
    There's the QuickTime mailing list too:
    http://lists.apple.com/mailman/listinfo/quicktime-api
    And the ProAppsDev list:
    http://lists.apple.com/mailman/listinfo/pro-apps-dev

  • WHO CAN HELP

         I have just joined this "Discuccion site" Ihave had most of the problems that have been mentioned. The largest problem I have seen over the years is the lack of caring by customer service. They did not care in any way. This past year I have noticed a slight improvement. Now they will tell you that you may talk to a supervisor, but they have no idea who they work for, who sign their checks and a telephone number were you may call and have someone help you with your problems. I for one want to know who I work for, who pays me for working, and how to get intouch with someone who can help if I have a problem. So, since they never could give me any of this information that might help me I look it up for myself.   Verzion is owned by a company named Celico Partnership.  The officers of Verzion are:
              Ivan G Seidenberg      Chairman
              Lowell C Meadam       President CEO and Director
              Roger Gurnani             EVP and CIO
               Kathleen Grillo           Verzion Senior VP Federal Regulatory Affairs
    I found these names and their seretary's  names and numbers with very little time in researching.  It at least gave me a place to go to if needed and could also tell the Verizon repersentive who they worked for.

    I got my iphone, and open box... I found iphone ( there wasn't any operator card) he look's good... And then when i insert my operator card, change country and rigion, make wifi connection , it write "only compatible SIM cards from a supported Carrier may be used to activate Iphone...Please insert the Sim card that came with your iPhone or visit a supported Carrie's store to receive a replacement Sim"....  I know that it is unbelivible, but maybe apple make mistake??? What to do?

  • Is there anyone who can help me to design a index page

    Hi guys
    I would like to design a index page like this site :
    http://www.hostplate.com
    Is there anyone who can help me ?

    Your example site is built with WordPress (a popular open source framework).
    You'll need to have a good working knowledge of HTML, CSS and some familiarity with PHP code & the ability to set-up a MySql database on your server.  The good news is that there is a wealth of on-line information available to you.
    HTML, CSS, PHP Tutorials - http://w3schools.com/
    Getting Started with WordPress - http://codex.wordpress.org/Getting_Started_with_WordPress
    If all this is outside your comfort zone and you're prepared to hire an experienced web developer to help you,
    feel free to contact me through my web site:  http://alt-web.com
    Nancy O.
    Alt-Web Design & Publishing
    Web | Graphics | Print | Media  Specialists 
    http://alt-web.com/
    http://twitter.com/altweb

  • HT202213 iTunes: Home sharing can't be activated due to an error (5506). Who can help?

    iTunes: Home sharing can't be activated due to an error (5506). Who can help?
    I have an Apple ID but for some reason iTunes does not recognizes it.
    I have downloaded the latest version of iTunes as well?

    Did you ever figure it out? I am new to itunes and it won't allow me to home share with my daughter because I don't have a credit card.

  • Question about function with in parameters

    Hello,
    I have a question about functions with in-parameters. In the HR schema, I need to get the minimum salary of the job_id that is mentioned as an in-parameter.
    this is what I am thinking but I dont know if it's correct or not or what should I do next!
    create or replace function get_minimum_salary (i_job_id in varchar2)
    return number
    as
    begin
    SELECT min_salary INTO min_sal
    FROM jobs
    where job_id = get_minimum_salary(xy);
    RETURN i_job_id;
    end get_minimum_salary;
    thanks in advance
    EDIT
    Thanks for your help all.
    Is it possible to add that if the i_job_id which is the in type parameter does not have a minimum salary then use the following function to register an error:
    create or replace procedure insert_error (i_error_code in number,
                                                      i_error_message in varchar2)
    as
    begin
    insert into error_table (error_user, error_date, error_code, error_message)
    values (user,sysdate,i_error_code,i_error_message);
    end insert_error;
    This function is basically to say that an error has occured and to register that error, at the same time I need to print out the error using the dbms_out.put_line.
    Any ideas of how to do that?
    Thanks again
    Edited by: Latvian83 on Jun 1, 2011 5:14 AM

    HI
    I have made little bit changes in ur code. try this
    create or replace function get_minimum_salary (i_job_id in varchar2)
    return number
    as
    v_Min_sal jobs.salary%type=0;---- Variable declaration
    begin
    SELECT min_salary INTO v_ min_sal
    FROM jobs
    where job_id = i_job_id;
    RETURN v_Min_sal;
    end get_minimum_salary;
    Regards
    Srikkanth.M

  • General question on SQL Server 2000 to Oracle 10g

    Hello all,
    I just have a general question on migration from SQL Server 2000 to Oracle 10g using SQL Developer.
    How does it migrate Users with proper privileges from SQL Server to Oracle? Follow the interface steps? Or should the users be created on destination Oracle side?
    Thank you.

    Hi,
    It depends which type of migration you are making.
    For a 'Standard' migration when you migrate data a 'create user' statement is created as part of the migration and you will see this in the generated code.
    If you are using the 'Quick' migration option then you need to create the Oracle user or use an existing user to receive the data.
    Your best option is to review the documentation available from -
    http://www.oracle.com/technology/tech/migration//workbench/index_sqldev_omwb.html
    or directly from -
    http://download.oracle.com/docs/cd/E12151_01/index.htm
    and then get back with specific questions if this does not give you the information you need.
    Review the chapter -
    2. Migrating Third-Party Databases
    in -
    Oracle® Database SQL Developer User’s Guide Release 1.5
    Regards,
    Mike

  • Java and MS SQL Server 2000 problem, please help

    please help me. I am using java and MS SQL Server 2000, and I'm trying to access and verify the login. I'm getting the following error message: [Microsoft][ODBC SQL Server Driver]Invalid Descriptor Index
    Can any please help in this regard.
    String userNumber = (String)userNumField.getValue();
    char[] userPasswordArray = userPasswordField.getPassword();
    String userPassword = new String(userPasswordArray);
         try {
                Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                java.sql.Connection connection = java.sql.DriverManager.getConnection("jdbc:odbc:Dikolobe_Data");
                java.sql.PreparedStatement statement = connection.prepareStatement(
                        "SELECT USER_NUMBER, USER_PASSWORD, USER_CLASS, USER_STATUS " +
                        "FROM SYS_USER " +
                        "WHERE (USER_NUMBER = ? AND USER_PASSWORD = ?);");
                statement.setString(1, userNumber);
                statement.setString(2, userPassword);
                java.sql.ResultSet result = statement.executeQuery();
                if(result.next()) {
                    String userStatus = result.getString(4);
                    if(userStatus.equals("logged on")) {
                        String loginErrorMessage = "User with number: " + userNumber + " is already logged on.";
                        javax.swing.JOptionPane loginErrorPane = getNarrowOptionPane(72);
                        loginErrorPane.setMessage(loginErrorMessage);
                        loginErrorPane.setMessageType(javax.swing.JOptionPane.ERROR_MESSAGE);
                        javax.swing.JDialog loginErrorDialog = loginErrorPane.createDialog(null, "Login Error");
                        loginErrorDialog.setVisible(true);
                    else {
                        String userClassification = result.getString(3);
                        if(userClassification.equals("Administrator")) {
                            AdminHomePage newAdminHomePage = new AdminHomePage();
                            newAdminHomePage.setVisible(true);
                        else if(userClassification.equals("Educator")) {
                            EduHomePage newEduHomePage = new EduHomePage();
                            newEduHomePage.setVisible(true);
                        statement = connection.prepareStatement(
                                "UPDATE SYS_USER SET USER_STATUS = ? " +
                                "WHERE USER_NUMBER = ?");
                        statement.setString(1, "logged on");
                        statement.setString(2, userNumber);
                        statement.executeUpdate();
                        dispose();
                }

    Doesn't the following link give you enough information?
    http://www.google.com/search?q=invalid+descriptor+index
    Anyway .. This error means that the given ResultSet column index which you're trying to retrieve the value from is out of the range.

  • Why can't i use "INNER JOIN" in a query for SQL Server with JDBC??????

    Hi,
    I'm trying to execute some SQL queries and I just don't understand what's wrong.
    I�m using Tomcat and SQL Server in order to do this, but when I�m try to execute a query with a INNER JOIN statements Tomcat raise a SQL exception... at the very first time I thought there was a problem with database connection but I realize that a simple query to a table works pretty well. then I found out some problems with JDBC:ODBC.... so I install JDBC for SQL Server 2000 and test with the same simple query and works..... so, I come to a conclusion.... INNER JOIN or JOIN statements can't be used in JDBC..... please... somebody tell I�m wrong and give me a hand...
    I'm using TOMCAT 4 and JDK 1.4 SQL Server 2000
    Error occurs when executeQuery() is called.... not prepareStatement().... ??????
    Driver DriverRecResult = (Driver)Class.forName(driver).newInstance();
    Connection ConnRecResult = DriverManager.getConnection(DSN,user,password);
    PreparedStatement StatementRecResult = ConnRecResult.prepareStatement(query);
    ResultSet RecResult = StatementRecResult.executeQuery(); <---- Exception raise here
    So much tahnks in advance,

    That's exactly what I think, driver it's raising the exception, but I don't know why.... i test the same query with INNER JOIN directly from SQL Query Analyser and it's works perfectly, my problem ain't SQL, but JSP and JDBC 'cause i'm a newbie about these issues.
    Common sense tell me possible problems lie in SQLServer drivers 'cause i run the same pages on JRUN through jdbc:odbc and do works well, but by now i just depend on Tomcat.....
    I've installed SQL Server drivers for JDBC but i just find it doesn't work fully... could be the version of JDK i've installed? what version do i need?
    ( I'm running Tomcat 4 with JDK 1.4 & SQL Server 2000 W2K )
    thanks for reply.

Maybe you are looking for

  • Imovie with 2nd momitor

    I have a 17" Apple CRT hooked up to my 15" PB in extended desktop mode. Is there any way of using one monitor to preview the movie while using the other to work, like FCP or an Avid? PowerBook G4 1.25ghz   Mac OS X (10.4.5)  

  • Graphic doesn't appear in Web Cockpit

    Hi, I am working with SEM-Cockpit and I need to show the graphics on the web. All the services are running into SAP WAS (transatction SICF) and my notebook has JRE installed. Therefore, the graphics don't appear. Tks, Douglas

  • Automatic IPA generation on own server side

    can i make ipa automatic using script on server side everything on own server side.

  • Redemption Not Valid

    I Seriously need some help.  I bought Adobe Photoshop Elements 12 with Premiere several days ago.  Since then I have been on this forum, I have tried everything recommended in troubleshooting, I have called Adobe, I have tried to return the product t

  • Can i use REALTIME EQUALIZER of AUDIGY from another application? API of AUDIGY?? H

    Hi to all,?Can i use EQUALIZER of AUDIGY from another application? need SDK? Help me?For example, VIDEOLAN hasn't a REALTIME EQUALIZER.... i want REALTIME EQUALIZER under VIDEOLAN or other application... can i use API of SOUNDBLASTER AUDIGY from anot