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.

Similar Messages

  • How to connect Java and Microsoft SQL Server 2000

    hi,
    could anyone please teach me how to connect Java and SQL Sever 2000?? if possible could you guys provide me with an example??? i could hardly find any relevant resources about it...
    Thanks ~!

    thanks for the information...
    by the way hv any working module on it?? i'm new to
    both Java and Microsoft SQL Server... Thanks againFirst things first... you should read this:
    http://java.sun.com/docs/books/tutorial/jdbc/
    This is microsofts official JDBC Driver: http://www.microsoft.com/sql/downloads/jdbcregister.asp
    Install it and the documentation has some usage examples

  • How to save and retrieve an image in JSP/Java and MS SQL/server 2000?

    Hi All,
    I am uploading an image from the JSP page and want to store it in MS SQL server. I have made a column by the name "COMPANY_LOGO" with data type as image MS SQL/server 2000. How do I save the full image in the table and how do I display the thumb nail image on the JSP page???
    Regards,
    Raj

    BEFORE YOU POST A TOPIC HERE: Please be sure your topic is related to features or functionality of this site. This forum is not for general technology questions. Not sure which forum to use? Try searching for your topic in the "Search Forums" element on the left panel.
    Post your question in
    http://forum.java.sun.com/forum.jspa?forumID=45
    or
    http://forum.java.sun.com/forum.jspa?forumID=48
    Do not reply here

  • Differnce Between Oracle 9i And MS SQL Server 2000

    Hi,
    What are the difference between Oracle 9i And MS SQL Server 2000.
    Thnaks

    Some links
    http://www.google.lv/search?hl=lv&q=oracle+sql+server+difference&meta=
    http://asktom.oracle.com/pls/asktom/f?p=100:1:487512552646613::NO:RP::
    http://www.mssqlcity.com/Articles/Compare/sql_server_vs_oracle.htm
    http://www.wisdomforce.com/dweb/resources/docs/MSSQL2005_ORACLE10g_compare.pdf
    But you have to remember one big thing - I've not seen yet one compare that was completely indifferent to any of the included DB's. So you can be sure that every doc that you get on MS website will say that SQL server is better, every doc on Oracle website will say that Oracle is better. Every doc on other websites will say that better DB either is:
    1) DB that has payed for the reserach paper
    2) DB that was mostly used by the researchers
    So of course you should be very cautious about each paper you get.
    Gints Plivna
    http://www.gplivna.eu

  • Problem of Teststand3.1 database and microsoft SQL Server 2000 personal edition

    I have a problem when using teststand database function with Microsoft sql server 2000. the error(seen in attached screenshot3.jpg) is:
    "An error occurred calling 'LogResults' in 'ITSDBLog' of 'DBLog 1.0 Type Library'
    An error occurred executing a statement.
    Schema: Generic Recordset (NI).
    Statement: UUT_RESULT.
    [Microsoft][ODBC SQL Server Driver][SQL Server]unable to insert NULL value to column "ID", table "test.dbo.UUT_RESULT";This column is not alowed to be blank. INSERT Failed. Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.
    [Microsoft][ODBC SQL Server Driver][SQL Server]terminated.
    Source: TSDBLog"
     Here I listed my proceess.
    1, Configure in SQL Sever, please see attached screenshot0.jpg
       a, Open SQL
       b, build a new database with the name of test
       c, import the data from "C:\Program Files\National Instruments\TestStand 3.1\Components\NI\Models\TestStandModels\Database\TestStand Results.mdb"
    2, Configure Microsoft SQL sever: please see attached screenshot1.jpg
       a, Open windows Control Panel and select "Data Sources (ODBC). Under system DSN tab, add a SQL server data source
    3, Configure teststand database option, see attached screenshot2.jpg
       a, configure logging option, enable
       b, configure datalink
       c, select schemas of "Generic recordset (NI)
       d, No change on the tabs of "statements" and "Columns/Parameters"
    4, run an seqence file with the proess model of SequentialModel.Seq.
    Attachments:
    Screenshot.zip ‏425 KB

    Thanks Scott,
      The database function is OK now after I changed imported tables in SQL Sever.
      Actually, I once tried anothor method that you refered by using the scripts
    located at: <TestStand>\Components\NI\Models\TestStandModels\Database\SQL Server Create Generic Recordset Result Tables.sql. Attached is the error screenshots, please help me on this.
    Thanks
    Jacky
    Attachments:
    Error.jpg ‏59 KB

  • MS SQL Server 2000 Problem to Connect

    Hi There
    I have a problem with MS SQL Server 2000 with Service Pack 3 and JDBC from Microsoft
    My tools are:
    - Windows 2003 Server Standart Edition
    - MS SQLServer 2000 with ServicePack 3
    - JDBC from Microsoft with ServicePack 3
    I want to connect in the database using JDBC.
    At first time, I follow the example to chance the authentication of SQL
    Server
    http://www.banmanpro.com/support/sql2k.asp
    Now, when I will try out to connect in the SQL Server, I receive this error
    message
    java.sql.SQLException: [Micro$oft][SQLServer 2000 Driver for
    JDBC][SQLServer]Login failed for user 'Administrador'.
    I'm trying to connect in SQL Server using my Windows Account, in other
    words, I'm using the ADMIN account of Windows and which was registered in
    the SQL Server.
    In then DriverManager.getConnection line from Java, the Username and
    Password is same the operation system, but I receive the error below.
    Maybe Can you help me please?

    You can't log in using Windows credentials using the MS driver (yes, I know that sounds kind of funny). Use jTDS for that, if you really need it (or if you encounter any other problems with the MS driver). Otherwise log in using SQL Server credentials (try with user sa and blank password if not sure).
    Alin.

  • WebLogic Server 7.0 and MS SQL Server 2000

    Hi,
    I'm trying to create a connection pool in WebLogic Server 7.0 for MS SQL Server
    2000, but I always get the following error message:
    <Error> <JDBC> <001060> <Cannot startup connection pool "mcp-ConnectionPool
    " weblogic.common.ResourceException: weblogic.common.ResourceException:
    Could not create pool connection. The DBMS driver exception was:
    java.sql.SQLException: Login failed for user 'JavaUser'. Severity 14, State 1,
    Procedure 'null null'
    , Line 0 Unable to connect, please check your server's version and availability.
    at weblogic.jdbc.mssqlserver4.TdsStatement.microsoftLogin(TdsStatement.java:2823)
    at weblogic.jdbc.mssqlserver4.MicrosoftConnection.beginLogin(MicrosoftConnection.java:44)
    When I try to connect to the database with dbping, I get the following error:
    Error encountered:
    java.sql.SQLException: Login failed for user 'JavaUser'. Severity 14, State 1,
    Procedure 'null null'
    , Line 0 Unable to connect, please check your server's version and availability.
    I'm able to connect to the same database with WebLogic Server 6.0 (SP2) using
    the exact same settings. Does anyone have an idea of what is wrong here? Do I
    need an updated driver?
    Here is an extract from my config file:
    <JDBCConnectionPool CapacityIncrement="5" DriverName="weblogic.jdbc.mssqlserver4.Driver"
    LoginDelaySeconds="5" MaxCapacity="20" Name="mcp-ConnectionPool" Password="{3DES}A4GocdgagGc="
    Properties="user=JavaUser" Targets="myserver"
    Any help would be greatly appreciated,
    Koen

    Hi. This is very odd. Would you please try a simple standalone program,
    such as below? Tell me what it does in both environments.
    Joe
    import java.sql.*;
    import java.util.*;
    public class foo
    public Connection connection;
    public static void main(String args[])
    throws Exception
    Connection c = null;
    try
    Properties properties = new Properties();
    properties.put("user", "sa"); // change for your properties...
    properties.put("password", "");
    properties.put("server", "QA75");
    Class.forName("weblogic.jdbc.mssqlserver4.Driver").newInstance();
    c = DriverManager.getConnection("jdbc:weblogic:mssqlserver4", properties);
    System.out.println("got a connection.");
    catch(Exception exception1)
    exception1.printStackTrace();
    finally
    if (c != null)
    try { c.close(); } catch(Exception ex) {}
    Koen Van hamme wrote:
    Hi,
    I'm trying to create a connection pool in WebLogic Server 7.0 for MS SQL Server
    2000, but I always get the following error message:
    <Error> <JDBC> <001060> <Cannot startup connection pool "mcp-ConnectionPool
    " weblogic.common.ResourceException: weblogic.common.ResourceException:
    Could not create pool connection. The DBMS driver exception was:
    java.sql.SQLException: Login failed for user 'JavaUser'. Severity 14, State 1,
    Procedure 'null null'
    , Line 0 Unable to connect, please check your server's version and availability.
    at weblogic.jdbc.mssqlserver4.TdsStatement.microsoftLogin(TdsStatement.java:2823)
    at weblogic.jdbc.mssqlserver4.MicrosoftConnection.beginLogin(MicrosoftConnection.java:44)
    When I try to connect to the database with dbping, I get the following error:
    Error encountered:
    java.sql.SQLException: Login failed for user 'JavaUser'. Severity 14, State 1,
    Procedure 'null null'
    , Line 0 Unable to connect, please check your server's version and availability.
    I'm able to connect to the same database with WebLogic Server 6.0 (SP2) using
    the exact same settings. Does anyone have an idea of what is wrong here? Do I
    need an updated driver?
    Here is an extract from my config file:
    <JDBCConnectionPool CapacityIncrement="5" DriverName="weblogic.jdbc.mssqlserver4.Driver"
    LoginDelaySeconds="5" MaxCapacity="20" Name="mcp-ConnectionPool" Password="{3DES}A4GocdgagGc="
    Properties="user=JavaUser" Targets="myserver"
    Any help would be greatly appreciated,
    Koen

  • Siebel 8.1 and MS SQL Server 2000

    I am upgrading our Siebel 7.8 instance running on MS SQL Server 2000 to Siebel 8.1 and MS SQL Server 2008. My original intent was to upgrade the database first (so that we would be runing Siebel 7.8 on MS SQL Server 2008), and then upgrade the application to 8.1.
    I have been running into resource issues with regard to the SQL Server upgrade. My question is:
    Can Siebel 8.1.1 run on MS SQL Server 2000?
    Thanks.
    -- Ken

    Hi
    You can migrate your 7.8 to MSSQL 2008 as this is a supported platform.
    Usually in an upgrade you will upgrade your development db platform as a source of your 8.1 upgrade process.
    For information, a reference document is the Siebel System Requirements and Supported Platforms aka SRSP
    [SRSP 7.8|http://download.oracle.com/docs/cd/E11886_01/V7/CORE/SRSP_78/SRSP78.pdf]
    [SRSP 8.1| http://download.oracle.com/docs/cd/E11886_01/V8/CORE/SRSP_81/SRSP_81.pdf]
    Please refer to the online version as this document is frequently updated.
    Enjoy
    Evtloglvl

  • XA and MS SQL Server 2000

    I am currently working on a project that proposes to use XA transactions with MS
    SQL Server 2000. I have been searching for information on this subject and have
    found information that worries me with regard to MS SQL Server 6.5 and XA transactions.
    The information I have gathered argues against using MS SQL Server 6.5 with XA
    transactions, mainly because it allows only 1 active transaction at a time.
    Does anyone have any information as to whether MS SQL Server 2000 has the same
    problem? I am thinking of suggesting a different XA RM as I have found no information
    stating the contrary.
    Many Thanks,
    Mick.

    Mick;
    I have already tried SQL Server with Tuxedo, and believe: it´s works, but I still
    try it using Tuxedo with a big load.
    The file attached has two source files with a short comments explain how to do,
    and what to do.
    If you prefer, I can send you the MSVC++6 Project
    My regards,
    Andre David
    Systems Engineer
    "Anthony Fryer" <[email protected]> wrote:
    >
    If it still uses the 'dbenlistxatrans' function, then I think it's a
    safe bet to
    say that it still is a poor mans XA. Avoid SQL Server and XA is a good
    rule of
    thumb.
    "Mick Fisher" <[email protected]> wrote:
    I am currently working on a project that proposes to use XA transactions
    with MS
    SQL Server 2000. I have been searching for information on this subject
    and have
    found information that worries me with regard to MS SQL Server 6.5 and
    XA transactions.
    The information I have gathered argues against using MS SQL Server 6.5
    with XA
    transactions, mainly because it allows only 1 active transaction ata
    time.
    Does anyone have any information as to whether MS SQL Server 2000 has
    the same
    problem? I am thinking of suggesting a different XA RM as I have found
    no information
    stating the contrary.
    Many Thanks,
    Mick.
    [source_example_using_sqlserver.zip]

  • Oracle 8i and Ms SQL Server 2000

    Hi
    I have the problem that we need to install a Oracle 8i Application Server on a Microsoft
    Windows 2000 Server Sp4 whit have an Microsoft SQL Server 2000 Sp3 on it
    The installation runs well, but the Net8 Configuration don´t finish.
    Know anybody a solution for this?

    MSs Jdbc Driver still requires Jdbc-Odbc bridge.
    Just go thru the URL,
    http://www.weblogic.com/docs/techsupport/faq/jdbckona_m
    sqlserver.html#bridge
    Hope this helps.
    SudhaThanks for the URL, but I think this page does not refer to the beta-JDBC driver which MS has made available recently. For instance it says that Microsoft's driver is a type 2 driver, while in reality it is type 4.
    Misja

  • Move datafiles and logfiles (Portal 6.0 and Microsoft SQL Server 2000)

    Hello,
    I have installed EP 6.0 with KMC and TREX. The database is MS SQL Server 2000.
    The datafiles and the logfiles of the portal are respectively located in the directory "C:\Program Files\Microsoft SQL Server\MSSQL\Data" and in "C:\Program Files\Microsoft SQL Server\MSSQL\LOG".
    I want to move these files in the disk D.
    How can I do it ?
    Is the procedure described in the site http://support.microsoft.com/kb/224071 correct ?
    I thank you for your help.
    Regards,
    Anne-Marie

    Francesc,
    Microsoft Exchange Server Integration in EP6.0
    The Microsoft Exchange server (subsequently called the Exchange server) is integrated using the Microsoft Exchange server transport. This transport integrates the scheduling capabilities of Exchange Server with SAP Enterprise Portal 6.0. The following versions of Microsoft Exchange server can be integrated with the Enterprise Portal.
    · Exchange Server 5.5 SP4
    · Exchange Server 2000
    · Exchange Server 2003
    The transport uses Microsoft Collaborative Data Objects 1.2.1 (subsequently called CDO) to access data from the Exchange server.
    You can check for more details on;
    http://help.sap.com/saphelp_nw04s/helpdata/en/7a/ec015c8446d447a83776d40f31c84f/frameset.htm
    Regards,
    James

  • SQL Server 2000 problem with MII Version 12.1.8 Build(24) Reconnecting

    Hi,
    I have a problem using XMII Version 12.1.8 Build(24) with com.microsoft.sqlserver.jdbc.SQLServerDriver JDBC driver with SQL 2000.
    The problem we have is the machine where the SQL server is installed on reboot as per schedule once a week. When the server comes back online, XMII  seems to get problem to reconnect correctly. Sometimes it reconnects perfectly, sometimes not.
    When it fails, the only way to fix the problem is to uncheck the 'Enabled' checkbox, then save the data server, then check the 'Enabled' checkbox, then save again.
    When the reconnect issue happens, uploading messages to SAP fail 100% of time, but downloading Control Recipes  from SAP works 50% of time. For example, some PO's can be processed correctly, some others not, causing data losses due to poor data buffering(buffering doesn't cover connection time out). The failed PO's are marked as 'Sent' into CO53 SAP transaction but in fact, are lost in a hole causing data losses.
    See the error we get atfer the server reboot:
    Unable to get a connection from the pool
    [EXCEPTION]
    com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host VANASR70, port 1433 has failed. Error: "connect timed out. Verify the connection properties, check that an instance of SQL Server is running on the host and accepting... [see details]
    Cannot create a connection to the database
    [EXCEPTION]
    com.sap.xmii.Illuminator.system.CommunicationException: Cannot create a connection to the database... [see details]
    Error processing transaction com.sap.xmii.bls.engine.TransactionInstance@cee764f
    [EXCEPTION]
    com.sap.xmii.scheduler.CronException: PMU ERR VAN - Cannot Qry MSIDs.... [see details]
    Unable to get a connection from the pool
    [EXCEPTION]
    com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host VANASR70, port 1433 has failed. Error: "Connection refused. Verify the connection properties, check that an instance of SQL Server is running on the host and accepting... [see details]
    Unable to get a connection from the pool
    [EXCEPTION]
    com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host VANASR70, port 1433 has failed. Error: "connect timed out. Verify the connection properties, check that an instance of SQL Server is running on the host and accepting... [see details]
    The only way we have thought to workaround this problem is to develop our own buffering method into XMII workbench puting all data received from SAP or SQL insert query into an Oracle temp database. We should probably be able to fix this by this way, but it reprensents many costs and efforts, so we try to avoid this for sure.
    Please, if you can provide us a patches or hints about how to fix this, it could be very appreciated because loosing data is very anoying.
    Thanks a lot!
    Edited by: mrmans on May 19, 2011 5:48 PM
    Edited by: Michael Appleby on May 19, 2011 6:10 PM

    The validation query is in place and the system works very well 99% of the time.
    When the SQL server machine reboot each sunday morning, during the time the machine is rebooting, the data server lose the connection which is normal, but when the machine comes back alive(less then 10 minutes), the data server seems to stay in an 'in-between' state showing the connection status 'Running' but showing also error messages posted in the orginial post in Netweaver logs. So at first look the data server is up and running and reconnected to SQL server after the reboot, but in fact, following these errors after the SQL server machine has rebooted, some data are processed correctly from SAP (Control Recipes) and some not.
    The problems looks like very similar to threadID 1596329.
    Here is the data server configuration for all our 5 data servers:
    Connector IDBC
    ConnectorID  
    ConnectorType SQL
    DatePrefix '
    DateSuffix '
    DaysRetention 7
    Description VANASR70 INTERFACE with MS-SQL JDBC 3.0
    Enabled T
    InitCommand  
    InternalDateFormat yyyy-MM-dd HH:mm:ss
    JDBCDriver com.microsoft.sqlserver.jdbc.SQLServerDriver
    MaxRetryCount 50
    Name PROF_INT_VAN
    PoolMax 150
    PoolSize 100
    RetryInterval 60000
    ServerPackage com.sap.xmii.Illuminator.connectors.IDBC
    ServerURL jdbc:sqlserver://VANASR70:1433;databaseName=INTERFACE
    Timeout 30
    UseCount 256
    UserName mii_user
    ValidationQuery SELECT GETDATE()
    WaitTime 60

  • Windows server 2003 connect to SQl server 2000 problem

    my problem
    D:\Myjava>java connect
    java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establis
    hing socket.
    at com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source
    at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
    at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown Source)
    at com.microsoft.jdbc.sqlserver.tds.TDSConnection.<init>(Unknown Source)
    at com.microsoft.jdbc.sqlserver.SQLServerImplConnection.open(Unknown Sou
    rce)
    at com.microsoft.jdbc.base.BaseConnection.getNewImplConnection(Unknown S
    ource)
    at com.microsoft.jdbc.base.BaseConnection.open(Unknown Source)
    at com.microsoft.jdbc.base.BaseDriver.connect(Unknown Source)
    at java.sql.DriverManager.getConnection(DriverManager.java:525)
    at java.sql.DriverManager.getConnection(DriverManager.java:171)
    at connect.getConnection(connect.java:26)
    at connect.displayDbProperties(connect.java:43)
    at connect.main(connect.java:79)
    Error Trace in getConnection() : [Microsoft][SQLServer 2000 Driver for JDBC]Erro
    r establishing socket.
    1)both my sql server server and client listen the port 1433
    2) on sql security -> Logins I have the user call test and password call 1234 can access to pubs
    what else I need to care
    Thank you

    This version did not have built in service packs. You have to install it sepeartely. Check this link.
    http://vyaskn.tripod.com/sqlsps.htm
    Best of luck
    Muhamamd Uzair Baig
    JEE Application Developer
    Dubai Customs.

  • Query Engine report error with Crystal Report 9 And MS SQL SErver 2000

    Hi,
    Currently I m doing a report with Crystal Report 9 and MS SQL as back End.I used a stored procedure to fetch data from DB.The Stored procedure works properly with query analyzer . But when I take report through application
    "Table Not Found" Error is coming.Later I Found that In stored procedure for certain conditions only this error comes.But I cant resolve it.
    Can any One check any pblm with this query
    ELSE IF ISNULL(@intSourceID,0) = 10 Or ISNULL(@intSourceID,0) = 11 Or ISNULL(@intSourceID,0) = 12 Or ISNULL(@intSourceID,0) = 13 Or ISNULL(@intSourceID,0) = 14  
    BEGIN
    IF ISNULL(@intSchemeID,0) <> 0  
    BEGIN
    Select* From table
    END 
    ELSE IF ISNULL(@intSchemeID,0) = 0  
    BEGIN
    Select 
    END 
    END
    When I comment the above codes , report works fine....
    Can any one help me....plz....I m in such a critical situation...

    Hi,
    Currently I m doing a report with Crystal Report 9 and MS SQL as back End.I used a stored procedure to fetch data from DB.The Stored procedure works properly with query analyzer . But when I take report through application
    "Table Not Found" Error is coming.Later I Found that In stored procedure for certain conditions only this error comes.But I cant resolve it.
    Can any One check any pblm with this query
    ELSE IF ISNULL(@intSourceID,0) = 10 Or ISNULL(@intSourceID,0) = 11 Or ISNULL(@intSourceID,0) = 12 Or ISNULL(@intSourceID,0) = 13 Or ISNULL(@intSourceID,0) = 14  
    BEGIN
    IF ISNULL(@intSchemeID,0) <> 0  
    BEGIN
    Select* From table
    END 
    ELSE IF ISNULL(@intSchemeID,0) = 0  
    BEGIN
    Select 
    END 
    END
    When I comment the above codes , report works fine....
    Can any one help me....plz....I m in such a critical situation...
    Refer the above statement highlighted in BOLD. That statement is WRONG. Select what ???? Try any one of the below statement,
    select ''
    --or
    select 0
    --or
    select null
    Regards, RSingh

  • Resource Breaks When Upgrade from SQL Server 2000 to 2005 - Help!

    I have a resource that connects to mutiple databases:
    <ResourceAttribute name='Databases' displayName='com.waveset.adapter.RAMessages:RESATTR_DATABASES'
    description='com.waveset.adapter.RAMessages:RESATTR_DATABASES_HELP' multi='true'>
    <value>dbOne</value>
    <value>dbTwo</value>
    <value>Employee_Info</value>
    </ResourceAttribute>
    It all works fine when the backend SQL server is 2000, but since we've upgraded it to 2005, the connection fails with this error:
    Test connection failed for resource(s):MenuSQL: Required database dbOne not found.MenuSQL: Required database dbTwo not found.MenuSQL: Required database Employee_Info not found.
    I'm using the MS SQL JDBC driver for 2005 and I've verified that my connection url is good:jdbc:sqlserver://%h:%p;databaseName=%d;integratedSecurity=true; where %h and %p are the correct host and ports.
    I turned on tracing of com.waveset.adapter.MSSQLServerResourceAdapter and com.waveset.adapter.JdbcResourceAdapter and I don't see any errors or issues reported.
    If I set it back to connect to the SQL 2000 databases, it works. If I change it to only connect to one database, rather than 3 it works. However, I need this working on 2005 with all three databases. Any ideas on what I can look at or how I can further troubleshoot this?
    Thanks in advance for any help!

    Turns out the driver I'm using is fine (sqljdbc.jar). The problem is that the IdM source code executes "sp_databases" to list the databases. In SQL versions prior to 2005 this would work by default. But with 2005 a user has to be granted permissions to do so.
    To fix it you need to either grant the IdM ID you're using VIEW DEFINITION permission at an appropriate scope: object level, database level or server level or modify the stored procedure so that it executes under the credentials of the owner.
    Here's some info: http://msdn.microsoft.com/en-us/library/ms187113.aspx

Maybe you are looking for

  • How do I trim a voice memo file saved on a Mac?

    How do I trim a voice message that has been saved as a file in the Mac's itunes music folder called voice memos?

  • ITunes suddenly refuses to open

    I'm looking for some help with my iTunes. I have windows 7 and have been running iTunes on it for months now. Just today I attempted to open iTunes and a few messages came up saying that I'm missing CoreVideo.dll, CoreAudioToolbox.dll, that there are

  • Missing printer software CD

    I have a used deskjet 940c printer, but no software cd to install it. is there a download available? I have a desktop computer with Windows XP.  Thanks.

  • How to copyi all phone contacts to SIM card

    Hello, I'm using this really bad network on my blackberry and it's really hard getting any good data service off it. As you'd imagine I wanna change to a better network. I was hoping I could copy all my contacts (they're less than 150) onto the sim m

  • NullPointer in SessionData

    After I logout from my default web-app (session.invalidate()), I got the           following exception when I try to logs in on the same browser:           java.lang.NullPointerException           at           weblogic.servlet.internal.session.Sessio