Please help - Scrollable result set in sql server 2000

Hi can some one please help me. I'm trying to create scrollable result set in sql server 2000, but i just can't get it to work. I've been trying to do this for the past 12 hours. I want to go home, but I can't till I get this going! please help!!! My crap code is as follows:
package transact;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.swing.JInternalFrame;
import java.sql.*;
import java.io.*;
import java.util.*;
public class DummyFrame extends Dummy
protected String name, surname;
protected Connection conn;
protected CallableStatement cstatement;
public DummyFrame()
createFrame();
private void createFrame()
try
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
conn = DriverManager.getConnection(
"jdbc:microsoft:sqlserver://server:1433;" +
"user=user;password=pwd;DatabaseName=Northwind");
catch (Exception e)
e.getMessage();
populateFields();
menuAction();
show();
private void menuAction()
btncontacts.addActionListener(new ActionListener()
public void actionPerformed(ActionEvent e)
getRecords();
populateFields();
btncontacts.setText("NEXT");
btnkeywords.addActionListener(new ActionListener()
public void actionPerformed(ActionEvent e)
// transaction.getRecords();
nextRecord();
populateFields();
btncontacts.setText("NEXT");
protected void nextRecord()
try
// CallableStatement cstatement = null;
cstatement = conn.prepareCall(
"{call Employee_Selection}", ResultSet.TYPE_SCROLL_INSENSITIVE,
ResultSet.CONCUR_UPDATABLE);
ResultSet rs = cstatement.executeQuery();
while (rs.next())
surname = rs.getString("Lastname");
cstatement.getMoreResults();
catch (Exception e)
e.getMessage();
protected void getRecords()
try
CallableStatement cstatement = null;
cstatement = conn.prepareCall(
"{call Employee_Selection}", ResultSet.TYPE_SCROLL_INSENSITIVE,
ResultSet.CONCUR_UPDATABLE);
ResultSet rs = cstatement.executeQuery();
while (rs.next())
surname = rs.getString("Lastname");
name = rs.getString("Firstname");
rs.first();
// call stored procedure
catch (Exception e)
e.getMessage();
// populate the fields;
private void populateFields()
txtfirstname.setText(name);
txtsurname.setText(surname);
}

ummm ok i think the logic in your code is kinda screwy...
here is what your should be doing.
create the gui.
get the resultset...
have code that looks like this for nextRecord...
protected void displayNextRecord(){
  // we do not call next here because we already called it last time
  surname = rs.getString("Lastname");
  name = rs.getString("Firstname");
  populateFields();
  if(!rs.next(){
    btncontacts.setEnabled(false);// i'm not sure what btncontacts is but we want to disable next becuase there are no more records...
// in your intitalization code you need to do this...
// you old stuff ending with...
ResultSet rs = cstatement.executeQuery();
// the new stuff...
if(rs.first()){
  displayNextRecord();
}else{
  btncontacts.setEnabled(false);//the result set is empty
}ok the real problem you are having is that you are trying to display one record at a time but you are scrolling
through the entire result set using while(rs.next()... what you
want to do is create the result set once and scroll through
it one item at a time with your gui.
the example method i have given displays the data from the current
row in your gui. then it advances the result set forward one row if possible. this method assumes that the result set will always
be positioned on a valid row thus the need for calling
rs.first() before we originally call displayNextRecord()
well i hope you find this helpful.

Similar Messages

  • Please help: how to connect to SQL Server Analysis Service (OLAP cube) with Crystal Re[ort XI

    I'm trying to connect to an OLAP cube on our SQL Server 2005 machine which is running Analysis Services (9.0).  When I am trying to use the Crystal Reports menu follow steps mentioned below:
    1) New report -> Standard Report Wizard
    2) Create New Connection -> OLAP -> Add
         Source Type: MS OLE DB Provider fir Analysis Service 9.0
    But when I click buttone 'Test', CR prompt me: The connection could not be establiched. Faild to set properties.
    HOWEVER: I can connect SQl Server Analysis Server with Excel and other Report tools.
    Our softwares are as mentioned following:
    - OS: Windows 2003 Server
    - SQL Server: SQL Server 2005 Enterprise
    - Crystal Reports XI Release 2 Developer Edition
    And SQL Server & Crystal Report are running in the same PC.
    Any help?

    Please re-post if this is still an issue with your OLAP Connectivity please post to Business Objects  » Other Business Objects Products Forum or purchase a case and have a dedicated support engineer work with you directly

  • Please help me in setting the Mobile server for mobile filed services

    hi,
    We want to set the oracle mobile server, Oracle mobile filed service, can any body help out what are the mandatory setups and flow of the setup.
    Can you also let me know the list of patch and requried services information too.
    Thanks & Regard
    Abdul Hafeez Shaik

    Thank you Kevin,
    I have already gone through this document.
    My actual problem is like, After starting the Mobile server when I tried to run this url <url:/portnumber>/webtogo/setup Am getting the webpage with junk values.
    What other patch's or what other setups we need to do to have the functionality like when ever we run the above given url it will install the client side software (webtogo + oracle lite database)
    Please if you can give me the quick setups which we need to do that would be help full to us.
    Best Regards
    Abdul Hafeez Shaik

  • Please help - AbstractTableModel, result set and JTable

    Pls help me on this:
    I derive a new class, myTable that extends the AbstractTableModel, one of the member method is like this:
    public void setValueAt( Object data, int row, int col ){
    try{
    resultSet.absolute( row + 1 );
    resultSet.updateDouble( col + 1, Double.parseDouble( data.toString()));
    resultSet.updateRow();
    }//end try
    catch( SQLException sqlEx ){
    JOptionPane.showMessageDialog( null, "SQL error", "", 1 );
    Everytime i try to update the data( which is double), example 2.00, i will see this runtime error:
    java.lang.NumberFormatError: 2.00
    The database is Microsoft Access 2000 and OS is Win ME. I update the data by using JTable GUI( which extends the new class myTable).
    When i try to use Oracle database, then there is no problem for this.
    How to solve this problem?

    can i get a look at your TableModel for the JTable.
    Your problem with Access: Access "double" is not the same as
    Oracle's double.
    you can try the various types that have decimals until you find
    which one access will accept.

  • SQL Server 2000\2005 compatibility with Active Directory 2012

    Hi All,
    We are currently using Active Directory 2003 and will be upgrading to AD 2012.  I'm trying to determine if there is any known compatibility issues when running older versions of SQL Server (2000 and 2005) when upgrading to AD 2012.   I've
    read forums from when others went from AD 2003 to AD 2008 and didn't experience any issues.  We have the newer versions of SQL but I'm not too concerned about these.  Any advice would be greatly appreciated?   Has anyone been through
    this process. 
    Thanks,

    Hi CraftsmanRobert,
    Based on my understanding, you used Active Directory 2003, then it would be upgraded to Active Directory 2012. You wanted to run older versions of SQL Server (2000 and 2005) with Active Directory 2012.
    Firstly, there can be a compatibility problem when run older version with Active Directory 2012. SQL Server 2005 (the release version and service packs) and earlier versions of SQL Server are not supported on Windows Server 2012 R2, Windows Server 2012,
    Windows 8.1, or Windows 8. For more information, please refer to this article: How to use SQL Server in Windows and Windows Server environments (http://support.microsoft.com/kb/2681562/en-us).
    Besides, Microsoft doesn’t provide assisted support for SQL Server 2000 and SQL Server 2005 already. Please upgrade the existing instance of SQL Server 2000 and SQL Server 2005 to a new version like SQL Server 2012. You can download SQL Server 2012 Express
    from this link:
    http://www.microsoft.com/en-us/download/details.aspx?id=29062.
    Best regards,
    Qiuyun Yu

  • 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.

  • 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

  • Migration Complete - SQL Server 2000 - But I Have a Question - Please Help

    I just ran the Oracle Migration workbench and converted a SQL Server 2000 database to Oracle 8i. I did get a few errors and warnings, all from the stored procedures. Which I will correct manually. However, when I log into DBA Studio, I can see the new tablespace for my converted database under storage. But theres nothing under the schema. Do I have to create this in order to manipulate the database. I wanna be able to modify some of the tables and stored procedures, but all I see in DBA Studio is the tabelspace for the converted database.
    I hope someone can help me with this.
    Thanks

    If your migration was sucessfull, then the schema's would also have been created on the target Oracle environment. You can go back to the Workbench and check the oracle model, to determine what schema(s) would be created. You can also check the log, or run a report to determine any errors during the migration phase.
    Donal

  • Java.sql.Statement.setFetchSize(int) option for non-scrollable result sets

    Hello!
    Our tests indicate that fetch size option mentioned makes visible difference in performance for non-scrollable result sets also. In the same time, it seems there is no way to set this option for such result sets at TopLink level, and default fetch size is always used instead.
    Can somebody propose a solution for this, I mean a way to specify custom fetch size (for results without any scrolling)?
    Thanks,
    Sergey

    To set the JDBC fetch size for a query, use the following APIs:
    int desiredFetchSize = 500;
    ReadAllQuery query = new ReadAllQuery(YourClass.class);
    CallQueryMechanism queryMechanism =
    (CallQueryMechanism) query.getQueryMechanism();
    DatabaseCall call = queryMechanism.getCall();
    call.setResultSetFetchSize(desiredFetchSize);
    If you wish to set the fetch size for all queries, consider using named queries for all queries (see the TopLink documentation for more information on named queries), and then configure them on startup.
    Information taking from Metalink Note:237093.1

  • Scrollable Result Set Problem With j2sdk1.4.0_01/jakarta-tomcat-4.0.1

    Consider the Following Code with j2sdk1.4.0_01/jakarta-tomcat-4.0.1
    try {
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection conn = DriverManager.getConnection("Jdbc:Odbc:IMSMC","sa","");
         String sql="select * from <Table Name> ";
    Statement stmt=conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
    *************Some Code ******************
    catch (Exception ex) {
    ex.printStackTrace();
    }//End of catch     
    }//End of Try
    The Tomcat automatically shuts down If I'm using Scrollable
    Result Set and the following Error Occurs.
              Error
    Unexpected Signal : EXCEPTION_ACCESS_VIOLATION occurred at PC=0x6D366658
    Function=[Unknown.]
    Library=c:\j2sdk1.4.0_01\jre\bin\client\jvm.dll
    NOTE: We are unable to locate the function name symbol for the error
    just occurred. Please refer to release documentation for possible
    reason and solutions.
    Current Java thread:
         at sun.jdbc.odbc.JdbcOdbc.setStmtAttrPtr(Native Method)
         at sun.jdbc.odbc.JdbcOdbc.SQLSetStmtAttrPtr(JdbcOdbc.java:4676)
         at sun.jdbc.odbc.JdbcOdbcResultSet.setRowStatusPtr(JdbcOdbcResultSet.java:4473)
         at sun.jdbc.odbc.JdbcOdbcResultSet.initialize(JdbcOdbcResultSet.java:171)
         at sun.jdbc.odbc.JdbcOdbcStatement.getResultSet(JdbcOdbcStatement.java:423)
         - locked <02A1FE80> (a sun.jdbc.odbc.JdbcOdbcStatement)
         at sun.jdbc.odbc.JdbcOdbcStatement.executeQuery(JdbcOdbcStatement.java:253)
         at org.apache.jsp.DocumentsPendingReport$jsp._jspService(DocumentsPendingReport$jsp.java:127)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:202)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:201)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2344)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:462)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163)
         at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
         at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:1011)
         at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:1106)
         at java.lang.Thread.run(Thread.java:536)
    Dynamic libraries:
    0x00400000 - 0x00406000      c:\j2sdk1.4.0_01\bin\java.exe
    0x77F80000 - 0x77FFB000      C:\WINNT\system32\ntdll.dll
    0x7C2D0000 - 0x7C332000      C:\WINNT\system32\ADVAPI32.dll
    0x7C570000 - 0x7C623000      C:\WINNT\system32\KERNEL32.DLL
    0x77D30000 - 0x77D9E000      C:\WINNT\system32\RPCRT4.DLL
    0x78000000 - 0x78045000      C:\WINNT\system32\MSVCRT.dll
    0x6D330000 - 0x6D445000      c:\j2sdk1.4.0_01\jre\bin\client\jvm.dll
    0x77E10000 - 0x77E6F000      C:\WINNT\system32\USER32.dll
    0x77F40000 - 0x77F79000      C:\WINNT\system32\GDI32.dll
    0x77570000 - 0x775A0000      C:\WINNT\system32\WINMM.dll
    0x75E60000 - 0x75E7A000      C:\WINNT\system32\IMM32.DLL
    0x6CA60000 - 0x6CA68000      C:\WINNT\system32\LPK.DLL
    0x66650000 - 0x666A4000      C:\WINNT\system32\USP10.dll
    0x6D1D0000 - 0x6D1D7000      c:\j2sdk1.4.0_01\jre\bin\hpi.dll
    0x6D300000 - 0x6D30D000      c:\j2sdk1.4.0_01\jre\bin\verify.dll
    0x6D210000 - 0x6D228000      c:\j2sdk1.4.0_01\jre\bin\java.dll
    0x6D320000 - 0x6D32D000      c:\j2sdk1.4.0_01\jre\bin\zip.dll
    0x6D2D0000 - 0x6D2DD000      C:\j2sdk1.4.0_01\jre\bin\net.dll
    0x75050000 - 0x75058000      C:\WINNT\system32\WSOCK32.dll
    0x75030000 - 0x75044000      C:\WINNT\system32\WS2_32.DLL
    0x75020000 - 0x75028000      C:\WINNT\system32\WS2HELP.DLL
    0x74FD0000 - 0x74FEE000      C:\WINNT\system32\msafd.dll
    0x75010000 - 0x75017000      C:\WINNT\System32\wshtcpip.dll
    0x6D250000 - 0x6D25A000      C:\j2sdk1.4.0_01\jre\bin\JdbcOdbc.dll
    0x0BDC0000 - 0x0BDF2000      C:\WINNT\system32\ODBC32.dll
    0x71780000 - 0x7180A000      C:\WINNT\system32\COMCTL32.dll
    0x782F0000 - 0x78538000      C:\WINNT\system32\SHELL32.dll
    0x70BD0000 - 0x70C34000      C:\WINNT\system32\SHLWAPI.DLL
    0x76B30000 - 0x76B6E000      C:\WINNT\system32\comdlg32.dll
    0x1F850000 - 0x1F866000      C:\WINNT\system32\odbcint.dll
    0x0BF00000 - 0x0BF5E000      C:\WINNT\System32\SQLSRV32.dll
    0x41090000 - 0x410BD000      C:\WINNT\System32\SQLUNIRL.dll
    0x77800000 - 0x7781E000      C:\WINNT\System32\WINSPOOL.DRV
    0x76620000 - 0x76631000      C:\WINNT\system32\MPR.DLL
    0x77820000 - 0x77827000      C:\WINNT\system32\VERSION.dll
    0x759B0000 - 0x759B6000      C:\WINNT\system32\LZ32.DLL
    0x779B0000 - 0x77A4B000      C:\WINNT\system32\OLEAUT32.dll
    0x77A50000 - 0x77B3C000      C:\WINNT\system32\ole32.dll
    0x75170000 - 0x751BF000      C:\WINNT\System32\NETAPI32.dll
    0x7C340000 - 0x7C34F000      C:\WINNT\System32\SECUR32.DLL
    0x751C0000 - 0x751C6000      C:\WINNT\System32\NETRAP.DLL
    0x75150000 - 0x7515F000      C:\WINNT\System32\SAMLIB.DLL
    0x77950000 - 0x7797A000      C:\WINNT\system32\WLDAP32.DLL
    0x77980000 - 0x779A4000      C:\WINNT\System32\DNSAPI.DLL
    0x769A0000 - 0x769A7000      C:\WINNT\system32\NDDEAPI.DLL
    0x1FA20000 - 0x1FA36000      C:\WINNT\System32\sqlsrv32.rll
    0x0C390000 - 0x0C3A9000      C:\WINNT\system32\odbccp32.dll
    0x0C3B0000 - 0x0C3BF000      C:\WINNT\system32\DBNETLIB.DLL
    0x75500000 - 0x75504000      C:\WINNT\system32\security.dll
    0x782D0000 - 0x782EF000      C:\WINNT\system32\msv1_0.dll
    0x77440000 - 0x774B8000      C:\WINNT\system32\CRYPT32.DLL
    0x77430000 - 0x77440000      C:\WINNT\system32\MSASN1.DLL
    0x77BF0000 - 0x77C01000      C:\WINNT\system32\ntdsapi.dll
    0x782C0000 - 0x782CC000      C:\WINNT\System32\rnr20.dll
    0x77340000 - 0x77353000      C:\WINNT\system32\iphlpapi.dll
    0x77520000 - 0x77525000      C:\WINNT\system32\ICMP.DLL
    0x77320000 - 0x77337000      C:\WINNT\system32\MPRAPI.DLL
    0x773B0000 - 0x773DF000      C:\WINNT\system32\ACTIVEDS.DLL
    0x77380000 - 0x773A3000      C:\WINNT\system32\ADSLDPC.DLL
    0x77830000 - 0x7783E000      C:\WINNT\system32\RTUTILS.DLL
    0x77880000 - 0x7790E000      C:\WINNT\system32\SETUPAPI.DLL
    0x7C0F0000 - 0x7C151000      C:\WINNT\system32\USERENV.DLL
    0x774E0000 - 0x77513000      C:\WINNT\system32\RASAPI32.DLL
    0x774C0000 - 0x774D1000      C:\WINNT\system32\RASMAN.DLL
    0x77530000 - 0x77552000      C:\WINNT\system32\TAPI32.DLL
    0x77360000 - 0x77379000      C:\WINNT\system32\DHCPCSVC.DLL
    0x777E0000 - 0x777E8000      C:\WINNT\System32\winrnr.dll
    0x777F0000 - 0x777F5000      C:\WINNT\system32\rasadhlp.dll
    0x77920000 - 0x77943000      C:\WINNT\system32\imagehlp.dll
    0x72A00000 - 0x72A2D000      C:\WINNT\system32\DBGHELP.dll
    0x690A0000 - 0x690AB000      C:\WINNT\system32\PSAPI.DLL
    Local Time = Sat May 01 11:30:40 2004
    Elapsed Time = 5
    # HotSpot Virtual Machine Error : EXCEPTION_ACCESS_VIOLATION
    # Error ID : 4F530E43505002D5
    # Please report this error at
    # http://java.sun.com/cgi-bin/bugreport.cgi
    # Java VM: Java HotSpot(TM) Client VM (1.4.0_01-b03 mixed mode)
    Also No Error is Thrown with j2sdk1.4.0
    If I'm using Not using Scrollable Result Set, No Error is Thrown.
    Error is Thrown only with Scrollable Result set and with j2sdk1.4.0_01

    Did you forget to put the SQL statement in when you used createStatement? I added it below:
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    Connection conn = DriverManager.getConnection("Jdbc:Odbc:IMSMC","sa","");
    String sql="select * from <Table Name> ";
    Statement stmt=conn.createStatement(sql, ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_READ_ONLY);
    Does the JDBC-ODBC bridge driver accomodate any of these settings you're trying?
    The problem shouldn't have anything to do with Tomcat. Sounds like a JDBC driver issue to me. Try to reproduce the error without Tomcat, and then see if adding the SQL corrects things at all.
    I'd read the docs to see if the bridge driver has these features. I don't think it's up to the full standard.

  • Scrollable result set fails with doubles

    Hi there,
    i have a strange behaviour using the 10g thin JDBC driver:
    Using a scrollable result set the driver fails reading a BINARY_DOUBLE value from the result set with rs.getDouble(column) as long as the value is not null. The SQLException reports "Conversion to double failed".
    When i use a forward-only result set instead, the value can be retrieved without any error. Can anyone explain this or give a workaround?
    Thanks in advance,
    Thorsten

    ThorstenS,
    ScrollableResultSet stores BINARY_DOUBLE column as oracle.sql.BINARY_DOUBLE & since, oracle.sql.BINARY_DOUBLE does not have method to convert to double you are seeing this error.
    The workaround would be to do,
    rs.getBINARYDOUBLE(1).stringValue()
    & please file an enhancement request against Jdbc.
    =
    Ashok

  • Org.hibernate.AssertionFailure: scrollable result sets are not enabled

    I am using hibernate with oracle and got the following code snippet:
    ScrollableResults results = criteria.scroll(ScrollMode.SCROLL_SENSITIVE);
    When I run the above snippet I get the following exception:
    org.hibernate.AssertionFailure: scrollable result sets are not enabled
    I'm using hibernate 3.2.2.ga and oracle 10g
    Can someone help me? How can I solve this problem?
    Victor Lindberg
    Edited by: user5745495 on 01/04/2010 14:15

    This is the "Database - General" forum for the Oracle Database.
    Please change the subject to "Please Ignore" and repost your question in a Java / JDeveloper forum.
    Thank you.

  • Help me trooubleshoot hsodbc with SQL Server

    Hi,
    I need ideas on how I can find the problem I have with setting up a generic connectivity to SQL Server
    via a database link and heterogeneous services.
    Oracle version is 10.2.0.1.0 on Windows Server 2003
    I create a SYSTEM DSN to a SQL Server 2000.
    The DSN tests "successfully".
    I used a third party query tool (SQL Assistant) to query the SQL Server db using the DSN and it works fine.
    I added this to the tnsnames.ora file
    myconn =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = myoracleserv)(PORT = 1521))
    (CONNECT_DATA=(SERVICE_NAME=myconn))
    (HS=OK)
    I added this to the listerner.ora file:
    (under the "SID_LIST_LISTENER =" portion)
    (SID_DESC =
    (SID_NAME = myconn)
    (ORACLE_HOME = E:\oracle\product\10.2.0\db_1)
    (PROGRAM = hsodbc)
    I created a file called initmyconn.ora under /hs/admin
    with this in it:
    HS_FDS_CONNECT_INFO = myconn
    HS_FDS_TRACE_LEVEL = odbc
    then I created the database link
    create database link myconn
    connect to myuser
    identified by mypwd
    using 'myconn';
    When I run a simple query, I get
    ORA-28545 error diagnosed by Net8 when connecting to an agent
    Unable to retrieve text of NETWORK/NCR message 65535
    ORA-02063: preceding 2 lines from MYCONN
    TNSPING works fine.
    I don't have any logs in hs/trace/
    I also successfully installed 3 other HS connections to SQL Server on the same machine, they all work.
    Any help in troubleshooting this?
    thanks,

    The 28545 error is a configuration error in the SQL*Net layer - HSODBC executable isn't spawned and thus you do not get a hsodbc trace/log file.
    To analye the issue, please provide the listener status (lsnrctl status).

  • Setting up SQL Server for LiveCycle ES2

    I have few queries regarding the installation please help.
    I am trying to install livecycle ES2 in Windows 7 system,Weblogic 11g,Sql server 2005 Dev Sp3
    1. In the installation guide under the section setting up sql server for Livecycle ES2 the below point mentioned .
    Select the Memory page and enter a size in the Minimum Server Memory (in MB) box that is equal to
    the size of the free memory on the server.
    How to find the free memory on the server ??
    http://help.adobe.com/en_US/livecycle/9.0/prepareinstallsingle.pdf
    2. Is It required to create LiveCycle ES2 database user, schema, and login in Sqlserver 2005 ? this step is not mentioned as optional why its required to create this stuffs ?
    3. While installing the Live Cycle Server when the installer prompts for a database configuration popup which db i should point to is it the db created for Livecycle or it should be the db from which i want fetch the data?
    4. In case if i am connecting to my application db (the place where my app data presents) where do i link the Livecycle db created with the Livecycle Server configuration?

    Hi,
    Do you have solution for this yet?
    I have same issue.
    Thanks
    YogLC

  • Java.lang.Exception: org.hibernate.AssertionFailure: scrollable result sets

    Hi All,
    I am using Oracle 11g and I am trying to delete some records from database using some GUI. In that case I am getting following error:
    java.lang.Exception: org.hibernate.AssertionFailure: scrollable result sets are not enabled. When I restart the application's service, this error is going away and deletion is working fine.
    Other related jars that I am using is as follow:
    ojdbc5.jar
    hibernate-3.0.5.jar
    I am attaching the stack trace as well:
    <log4j:event logger="org.hibernate.AssertionFailure" timestamp="1263964931355" sequenceNumber="24" level="ERROR" thread="SocketListener0-2">
    <log4j:message><![CDATA[an assertion failure occured (this may indicate a bug in Hibernate, but is more likely due to unsafe use of the session)]]></log4j:message>
    <log4j:throwable><![CDATA[org.hibernate.AssertionFailure: scrollable result sets are not enabled
    at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:368)
    at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:334)
    at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:88)
    at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1162)
    at org.hibernate.loader.Loader.scroll(Loader.java:1634)
    at org.hibernate.loader.hql.QueryLoader.scroll(QueryLoader.java:443)
    at org.hibernate.hql.ast.QueryTranslatorImpl.scroll(QueryTranslatorImpl.java:291)
    at org.hibernate.impl.SessionImpl.scroll(SessionImpl.java:960)
    at org.hibernate.impl.QueryImpl.scroll(QueryImpl.java:62)
    at com.sample.persistence.WorklistItemDAO.purge(WorklistItemDAO.java:145)
    at com.sample.server.worklistmanager.WorklistManager.purge(WorklistManager.java:695)
    at com.sample.server.webservices.CCGPIWorklistHandler.purge(CCGPIWorklistHandler.java:329)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.apache.xmlrpc.Invoker.execute(Invoker.java:130)
    at org.apache.xmlrpc.XmlRpcWorker.invokeHandler(XmlRpcWorker.java:84)
    at org.apache.xmlrpc.XmlRpcWorker.execute(XmlRpcWorker.java:146)
    at org.apache.xmlrpc.XmlRpcServer.execute(XmlRpcServer.java:139)
    at org.apache.xmlrpc.XmlRpcServer.execute(XmlRpcServer.java:114)
    at com.sample.server.webservices.XmlRpcServlet.service(XmlRpcServlet.java:63)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:428)
    at org.mortbay.jetty.servlet.ServletHandler.dispatch(ServletHandler.java:666)
    at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:568)
    at org.mortbay.http.HttpContext.handle(HttpContext.java:1530)
    at org.mortbay.http.HttpContext.handle(HttpContext.java:1482)
    at org.mortbay.http.HttpServer.service(HttpServer.java:909)
    at org.mortbay.http.HttpConnection.service(HttpConnection.java:816)
    at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:982)
    at org.mortbay.http.HttpConnection.handle(HttpConnection.java:833)
    at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:244)
    at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
    at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)
    ]]></log4j:throwable>
    </log4j:event>
    Thanks
    Shiv

    Hi All,
    anybody got a chance to look into it?
    --Shiv                                                                                                                                                                                                       

Maybe you are looking for

  • SRM PO not updated with BBP_PD_PO_UPDATE

    Hello, I want to updated payment terms from Vendor details to my PO through Z report, I'm following below steps 1. BBP_PD_PO_GETDETAIL 2. BBP_PD_PO_UPDATE - I"m getting e_changes = 'X' 3. BBP_PD_PO_SAVE - Passing current GUD which is updated 4. BBP_P

  • UIX - how do I selectively make inputs required?

    Ok, subject line probably not the best way to state this. I have a UIX page with a VO-based read-only table and two messageDate fields. The user needs to select a row in the table and fill in the fields before hitting the submit button. The messageDa

  • "No Service" post - 1.1.2 upgrade

    Good day all, Since I upgraded my iPhone to V1.1.2 I frequently receive a "No Service" condition after my phone has been left on for some time. (overnight or longer) Other cell phones which have been on for the same time period (Nokia 8801) continue

  • My home button won't work

    My husband's I-pad has been playing up! His home button won't work, and this keeps happening.

  • IOS Upgrade originating from a MPLS VRF

    What is equivalant MPLS "copy tftp flash" command to copy an image from a TFTP server located in a VRF? I can't get the router to pull IOS images unless the TFTP server is located in the Global Routing Table. I do realize this may be a stupid questio