Varying result set and binding parameters in sqlcmd from variable

SSIS  - Support of Multiple versions of our product
Our Enterprise Data warehouse consolidates data from multiple data sources.  We have a requirement that we should be able to support data collection from different version of these data sources at the same time.
Ex. Customer has three different versions of our product installed 7.3,  7.3.1 and 7.3.2. The data warehouse would in this case would be on version 7.3.2, but should be able to collect data from prior versions of the data sources.
We use stored procedures to collect data from sources into our staging area and then we transform and load it on to the warehouse. The design of SSIS packages are that, there is one main package that executes packages for each table that we collect data
from the source. The main package is invoked per source that we need to collect data from, if there are three sources at run time there will be three instances of the main package running. These packages run on the warehouse machine to pull the data from the
source system.
We would like to maintain one version of these packages on the warehouse and support collecting data from different source versions.
Challenges
The signature of stored procedures on the source system has changed between versions
There are some additional fields returned by these stored procedures in the newer release
 Example
 7.3 version signature :
[dbo].[PDW_GetMediaAgentSummary](@LastVersionID
AS BIGINT,
@InitializeDays as
INT = 60,
@NextVersionID AS
BIGINT OUTPUT)
7.3 Sp1 version signature:  [dbo].[PDW_GetMediaAgentSummary](@LastVersionID
AS BIGINT,
@DataStartDate AS
DateTime2(3),
@NextVersionID AS
BIGINT OUTPUT)
 Also, let us say in 7.3 this stored procedure returned 8 fields and 7.3 sp1 it is returning 10 fields.
The way we are trying to accommodate is to use “SQLCmd from variable” option in the OLE DB source to cover the signature difference, but this option does not allow us to bind parameters
to variables to get the output value. The second issue of additional fields (or the lack of additional fields from the 7.3 procedure), we tried to turned off the metadata validation, but we get field not found error at run time when we run the SSIS package
against 7.3 version. Looks like the only way we could solve is to duplicate the data flow tasks, based on the source version. Looking for better way to do this, since this could go out of control as the number of releases increases.
Appreciate help on this.

I suggest you branch your package into one route vs another based on some flag that indicates version the package is connected to then it will execute one stored proc or another, this can be done
using the Precedence Constraints, or make a wrapper stored proc that hides the data differences between the versions.
Arthur
MyBlog
Twitter

Similar Messages

  • How can I use a Lookup task to lookup from my SQL Result set and have a join

    So in my Control Flow, I have an Execute SQL Task which gets my Table result set. I then have a Foreach Loop Container that iterates through the result set and a Data Flow. The first task in the Data Flow is an OLE DB Source SQL Command that retrieves data
    columns associated with my result set. I then do a Derived Column so I can SUBSTRING from one of my data columns and now I want to perform a Lookup to my Application Database.
    How do I code my Lookup task to utilize my SQL Result set variable and match on it? I cannot use the GUI for the Lookup task as my Lookup has to have some JOINS in it.
    Thanks for your review and am hopeful for a reply.

    Can you expand on that? I'm sorry but I am new and a novice to the SSIS world and I want to do this as best I can and as efficiently as I can. Are you saying that Rajen's way suggested above is the way to go?
    A little background....external data from a 3rd party client. I'v staged that external data to a SQL Server staging table. I have to try and match that data up to our database using SSN, DOB, and Gender...and if I can't match that way then I have to try
    and match by Name. I need to make sure that there is only one and only one account for that match. If I cannot match and match one and only one, then I'll create rows on a DataAnomaly Table. If I do match, then I have to check and make sure that there is only
    one and only one Member span for that match. Similarly handle the data anomaly and then check and make sure there is a "Diabetes" claim and similarly handle the DataAnomaly accordingly.
    That's where I'm at. Sooooo are you saying to use Rajen's suggestion? I don't think I can do that because I need multiple SQL tasks and I cannot connect multiple OLE DB Source tasks.
    Any help and suggestions are greatly appreciated.
    Thanks.

  • Why to need close the result set and statement

    why to need close the result set and statement

    It's best to explicitly close every ResultSet, Statement, and Connection in the narrowest scope possible.
    These should be closed in a finally block.
    Since each close() method throws SQLException, each one should be in an individual try/catch block to ensure that a failure to close one won't ruin the chances for all the others.
    You can capture this in one nice utility class, like this:
    package db;
    import java.sql.*;
    import java.util.ArrayList;
    import java.util.Map;
    import java.util.LinkedHashMap;
    import java.util.List;
    import org.apache.commons.logging.Log;
    import org.apache.commons.logging.LogFactory;
    * Created by IntelliJ IDEA.
    * User: MD87020
    * Date: Feb 16, 2005
    * Time: 8:42:19 PM
    * To change this template use File | Settings | File Templates.
    public class DatabaseUtils
         * Logger for DatabaseUtils
        private static final Log logger = LogFactory.getLog(DatabaseUtils.class);
        /** Private default ctor to prevent subclassing and instantiation */
        private DatabaseUtils() {}
         * Close a connection
         * @param connection to close
        public static void close(Connection connection)
            try
                if ((connection != null) && !connection.isClosed())
                    connection.close();
            catch (SQLException e)
                logger.error("Could not close connection", e);
         * Close a statement
         * @param statement to close
        public static void close(Statement statement)
            try
                if (statement != null)
                    statement.close();
            catch (SQLException e)
                logger.error("Could not close statement", e);
         * Close a result set
         * @param rs to close
        public static void close(ResultSet rs)
            try
                if (rs != null)
                    rs.close();
            catch (SQLException e)
                logger.error("Could not close result set", e);
         * Close both a connection and statement
         * @param connection to close
         * @param statement to close
        public static void close(Connection connection, Statement statement)
            close(statement);
            close(connection);
         * Close a connection, statement, and result set
         * @param connection to close
         * @param statement to close
         * @param rs to close
        public static void close(Connection connection,
                                 Statement statement,
                                 ResultSet rs)
            close(rs);
            close(statement);
            close(connection);
         * Helper method that maps a ResultSet into a map of columns
         * @param rs ResultSet
         * @return map of lists, one per column, with column name as the key
         * @throws SQLException if the connection fails
        public static final Map toMap(ResultSet rs) throws SQLException
            List wantedColumnNames = getColumnNames(rs);
            return toMap(rs, wantedColumnNames);
         * Helper method that maps a ResultSet into a map of column lists
         * @param rs ResultSet
         * @param wantedColumnNames of columns names to include in the result map
         * @return map of lists, one per column, with column name as the key
         * @throws SQLException if the connection fails
        public static final Map toMap(ResultSet rs, List wantedColumnNames)
            throws SQLException
            // Set up the map of columns
            int numWantedColumns    = wantedColumnNames.size();
            Map columns             = new LinkedHashMap(numWantedColumns);
            for (int i = 0; i < numWantedColumns; ++i)
                List columnValues   = new ArrayList();
                columns.put(wantedColumnNames.get(i), columnValues);
            while (rs.next())
                for (int i = 0; i < numWantedColumns; ++i)
                    String columnName   = (String)wantedColumnNames.get(i);
                    Object value        = rs.getObject(columnName);
                    List columnValues   = (List)columns.get(columnName);
                    columnValues.add(value);
                    columns.put(columnName, columnValues);
            return columns;
         * Helper method that converts a ResultSet into a list of maps, one per row
         * @param rs ResultSet
         * @return list of maps, one per row, with column name as the key
         * @throws SQLException if the connection fails
        public static final List toList(ResultSet rs) throws SQLException
            List wantedColumnNames  = getColumnNames(rs);
            return toList(rs, wantedColumnNames);
         * Helper method that maps a ResultSet into a list of maps, one per row
         * @param rs ResultSet
         * @param wantedColumnNames of columns names to include in the result map
         * @return list of maps, one per column row, with column names as keys
         * @throws SQLException if the connection fails
        public static final List toList(ResultSet rs, List wantedColumnNames)
            throws SQLException
            List rows = new ArrayList();
            int numWantedColumns = wantedColumnNames.size();
            while (rs.next())
                Map row = new LinkedHashMap();
                for (int i = 0; i < numWantedColumns; ++i)
                    String columnName   = (String)wantedColumnNames.get(i);
                    Object value = rs.getObject(columnName);
                    row.put(columnName, value);
                rows.add(row);
            return rows;
          * Return all column names as a list of strings
          * @param rs query result set
          * @return list of column name strings
          * @throws SQLException if the query fails
        public static final List getColumnNames(ResultSet rs) throws SQLException
            ResultSetMetaData meta  = rs.getMetaData();
            int numColumns = meta.getColumnCount();
            List columnNames = new ArrayList(numColumns);
            for (int i = 1; i <= numColumns; ++i)
                columnNames.add(meta.getColumnName(i));
            return columnNames;
    }Anybody who lets the GC or timeouts or sheer luck handle their resource recovery for them is a hack and gets what they deserve.
    Do a search on problems with Oracle cursors being exhausted and learn what the root cause is. That should convince you.
    scsi-boy is 100% correct.
    %

  • Help with streaming result sets and prepared statements

    hi all
    I create a callable statement that is capable of streaming.
    statement = myConn2.prepareCall("{call graphProc(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)}",java.sql.ResultSet.TYPE_FORWARD_ONLY,
    java.sql.ResultSet.CONCUR_READ_ONLY);
    statementOne.setFetchSize(Integer.MIN_VALUE);
    the class that contains the query is instantiated 6 times the first class streams the results beautifully and then when the second
    rs = DatabaseConnect.statementOne.executeQuery();
    is executed I get the following error
    java.sql.SQLException: Can not use streaming results with multiple result statements
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:910)
    at com.mysql.jdbc.MysqlIO.readAllResults(MysqlIO.java:1370)
    at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1688)
    at com.mysql.jdbc.Connection.execSQL(Connection.java:3031)
    at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:943)
    at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1049)
    at com.mysql.jdbc.CallableStatement.executeQuery(CallableStatement.java:589)
    the 6 instances are not threaded and the result set is closed before the next query executes is there a solution to this problem it would be greatly appreciated
    thanks a lot
    Brian

    Database resources should have the narrowed scope
    possible. I don't think it's a good idea to use a
    ResultSet in a UI to generate a graph. Load the data
    into an object or data structure inside the method
    that's doing the query and close the ResultSet in a
    finally block. Use the data structure to generate
    the graph.
    It's an example of MVC and layering.
    Ok that is my bad for not elaborating on the finer points sorry, the results are not directly streamed into the graphs from the result set. and are processed in another object and then plotted from there.
    with regards to your statement in the beginning I would like to ask if you think it at least a viable option to create six connections. with that said would you be able to give estimated users using the six connections under full usage.
    just a few thoughts that I want to
    bounce off you if you don't mind. Closing the
    statement would defeat the object of of having a
    callable statement How so? I don't agree with that.
    %again I apologise I assumed that since callable statements inherit from prepared statements that they would have the pre compiled sql statement functionality of prepared statements,well If you consider in the example I'm about to give maybe you will see my point at least with regards to this.
    The statement that I create uses a connection and is created statically at the start of the program, every time I make a call the same statement and thus connection is used, creating a new connection each time takes up time and resources. and as you know every second counts
    thanks for your thoughts
    Brian.

  • HT1386 My wife & me have each an iphone and use the same computer to sync.  I sync my iphone and got my husband data.  I lost my data?  Can I recover my data by restoring my phone to manufacturer's setting and bwe able to sync from my old phone?

    My data were erase from my iphone 4?  I sync in the computer and got the data of my wife.  Will I be able to recover my old data by restoring my
    iphone to manufacturer's setting and recover my old data from my old phone?

    do you have icloud? if u have then u can restore your data by sync with icloud. change the setting in your i tunes.

  • DSC alarm set and cleared without operator ack - the variable should be not alarmed and not acked

    We are deeply involved in porting our application from 7.1.1 to 8.6.1 under Windows XP.
    Our application  heavily depends on DSC and moving from 7.1.1 to 8.6.1 is actually much more than a simple porting....
    here is our last problem:
    it seems that there is no discrimination between 'active' alarms and 'acknowledged' alarms on a shared Variable  in case the 'ack Type' is set to 'USER'.
    Here is what happens:
    1) a Boolean shared variable is defined to be alarmed when 'high' (TRUE) and its ack type is set to 'USER' (the operator at our application must ack alarms).
    2) the Boolean var is set to TRUE -> it is declared alarmed (OK)  and not ack'ed (OK)
    3) the operator ack the variable -> it is declared alarmed (OK)  and ack'ed (OK)
    4) the Boolean var is set to FALSE -> it is declared not alarmed (OK)  and ack'ed (OK)
    5) the Boolean var is set to TRUE -> it is declared alarmed (OK)  and not ack'ed (OK)
    6) the Boolean var is set to FALSE -> it is declared alarmed (NOT OK!!!)  and not ack'ed (OK)
    7) the operator ack the variable -> it is declared not alarmed (OK)  and ack'ed (OK)
    This last case is the wrong situation: an alarm has been set and cleared without operator ack the variable should be not  alarmed  and not acked 
    Actually the variable returns OK only when ack'ed.
    see the attached project in which a small vi and a small shared variable lvlib allows to repeat the above steps.
    Note:
    A) same situation applies to 'double' shared variable
    B) under DSC version 7.1.1 everithing was OK 
    can anyone Help?
    Thank You Guglielmo Rozera
    Attachments:
    AlmAckTest.zip ‏18 KB

    Thank for your replay!
    I have tried to undeploy and deploy the library with ack type set to 'User' by default, and then run the vi but the behavior is always the same.
    The modification you suggest does not set 'User' ack type because data socket needs '2'  as 'User ' setting while property node needs '1' or (better) its own enumerated type.
    Anyway I've corrected the vi according to your suggestion and tried again but nothing changed...
    Here I attach the project modified with property node and an indicator to show what is the actual ack type
    I hope in your further investigations!
    Thank You
    Guglielmo 
    Attachments:
    AlmAckTest_2.zip ‏20 KB

  • Value sets and Report Parameters

    Hi
    these are my requirements
    i have developed report using scott where the
    parametes are
    dname
    empinfo
    (1)If i select Department 1o then
    in parameter empinfo should display the value only from department 10
    (2) i have created a value set for report parameters empinfo
    it only shows two columns like EMPNO AND eNAME AND THERE only two column space to be shows
    how could i make columns to be displayed in addition to ename and empno
    Regard

    Hi KittyCat101,
    If I understand correctly, you want to use a parameter to filter Status field that starts with “Is” or “Can” or “Fi”. If in this scenario, we can refer to the following steps to achieve your goal:
    Modify the available values for @Status parameter to “Is”, “Can” and “Fi”.
    Right-click the tablix or dataset to open the properties dialog box.
    Select Filter in the left pane, then add a filter like below to filter Status field:
    Expression: =Fields!Status.Value like (Parameters!Status.Value & "*")  Type: Boolean
    Operator: =
    Value: true
    If there are any other questions, please feel free to ask.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • Calling a Stored Procedure with a result set and returned parms

    I am calling a stored procedure from a Brio report. The stored procedure returns a result set, but also passes back some parameters. I am getting a message that states that the DBMS cannot find the SP with the same footprint. Besides the result set, the SP returns 3 out parameters: (Integer, char(60), char(40)). Is there something special I need to do in Brio to format the out parameters to be passed back from the SP.
    Thanks,
    Roland

    Did you try just declaring the vars?
    untested
    declare
      myCur SYS_REFCURSOR;
      myRaw RAW(4);
      BEGIN
        test (0, 0, myRaw, sysdate, myCur);
      END;

  • Result set two few parameters exception!!?

    when i use the following code:
           res = stat1.executeQuery("SELECT * FROM Word where word="+current );
    where res is a result set
    stat1 is a statement
    current is a string
    the following exception appears after running:
    java.sql.sqlexception[microsoft][ODBC microsoft access Driver] Two few parameters.Expected 1.
    Any one can help me with this problem plz?

    is the (?) from the syntax?in:
    PreparedStatement ps =
    connection.prepareStatement("SELECT * FROM Word WHERE
    word=?");
    ps.setString(1, someWord);
    rs = ps.executeQuery(); [url http://java.sun.com/developer/onlineTraining/Database/JDBC20Intro/JDBC20.html#JDBC207]http://java.sun.com/developer/onlineTraining/Database/JDBC20Intro/JDBC20.html#JDBC207

  • Why should we have to close the result set and statement

    I am told that , I have to close my connection , result set , statement objects in finally block.
    why we need to do this ?
    If close the connection wont it be sufficient?

    To ensure that resources are freed in the client and in the database server.
    Yes, closing the connection is enough. Except if you are a bit paranoid about broken JDBC drivers that don't close dependent resources properly - but I haven't seen such drivers in real life.
    One important reason why programmers close ResultSets and Statements is that they use connection pools. In that case the Connection is returned to the pool instead of closing it. It is good practice to close RS's and Statements in preparation for the day when you graduate to writing code where you too will want to use a connection pool instead of the sloooooow reconnect-close-reconnect-close-etc.

  • Loop through result set and delete row

    so here is what I need -
    I have a query that pulls rows from the Database through a stored procedure.(these are properties in an area)
    Before I start looping through the query, I need to check the distance between my current location and the property. If it less than 5 miles, only then should I display that property. The distance in miles will be chosen while submitting the search form.
    So is there a way to delete rows from the result set based on the criteria? Or
    Is there a better way to accomplish this? I am using the the google api to get the latitudes and longitudes. The other issue to keep in mind is the load time.
    Thanks

    You can do this the easy way or the hard way.  Depends on whether your condition that needs to be checked can be expressed in the form of a SQL where clause.  If it can, then do what BKBK suggested, and use a query of query to create a new resultset that only has the rows from the original resultset that don't meet your condition.
    If the calculation of the condition is more complex, then do a CFLOOP over the query and examine each row to see if you want to keep it or toss it.  if you want to toss it, the delete that row - there is a function in CFLIB.ORG called querydeleterow that should help you.  Or, you could just clear out the row's contents and then do the query of query as described in BKBK's post to create a new resultset that doesn't include the blank rows.

  • Result Sets and Stored Procedure

    In advance one question in general - since I never know: What actually is a result set???
    Is it a cursor with a direct connection to the server-side database-data ? Or is it just a copy of the results once "loaded" by the query and delivered by the Server to the client ???
    Second: I have a Stored Procedure on a MS SQL Server 2000
    I try to call the stored procedure via jdbc. The last query in the Stored Proc is a query relying on local temporary tables. If I execute the stored procedure by my java-class, i get a
    java.sql.SQLException: [Microsoft][SQLServer JDBC Driver]No ResultSet set was produced.
    The usual "Select, Update and Insert-stuff" works fine with JDBC.
    Stored Procedures WITHOUT resultset work fine too.
    But this one just refuses to give me the results.
    Executing the same stored procedure in 'MS SQL-QUERYANALYZER' gives me my expected results.
    Any ideas?
    Sven

    In advance one question in general - since I never
    know: What actually is a result set???
    Is it a cursor with a direct connection to the
    server-side database-data ? Or is it just a copy of
    the results once "loaded" by the query and delivered
    by the Server to the client ???The first one, more or less. It relies on the connection to retrieve the results, .. if the connection is lost, so is the data in the ResultSet.
    Second: I have a Stored Procedure on a *MS SQL Server
    2000*
    I try to call the stored procedure via jdbc. The last
    query in the Stored Proc is a query relying on local
    temporary tables. If I execute the stored procedure by
    my java-class, i get a
    java.sql.SQLException: [Microsoft][SQLServer JDBC
    Driver]No ResultSet set was produced.Have you tried a basic stored procedure that should return a ResultSet?.. maybe one that doesn't rely on the temporary tables? You may want to also check with the support for the driver you're using since that's really where the ability to use stored procedures resides.

  • Using a Custom Method to Set the Bind Parameters in a View Object

    Hi all:
    i tried to follow the tutorial in oracle jdeveloper 10.1.2 documentation about creating a simple search page but i'm receiving this error when i tried to test the application module after i added a where clause to my view object(i.e where dept_id= :1) and define a custom method to bind variables in the appmodule class
    i keep getting this error
    JBO-27122: SQL error during statement preparation. Statement: SELECT Employees.EMPLOYEE_ID, Employees.FIRST_NAME, Employees.LAST_NAME, Employees.SALARY, Employees.DEPARTMENT_ID Employees.DEPARTMENT_ID = :1
    ????? IN ?? OUT ????? ?? ??????:: 1
    when i used the setwhere metohd it works
    i'll apprciate ur answer
    regards

    I have the same problem:
    Just like in Toystore Demo I am calling the following method in my VO:
       * Find an account by username and password, leaving the account
       * as the current row in the rowset if found. BUT EVEN IF WE FIND ACCOUNT BY
       * USERNAME AND PASSWORD, IT WILL RETURN FALSE IF THE ACCOUNT IS DISABLED!!!!
       * @param username the username
       * @param password the user's password
       * @return whether the user account exists or not
      public boolean findAccountByUsernamePassword(String username, String password) {
         * We're expecting either zero or 1 row here, so indicate that
         * by setting the max fetch size to 1.
        setMaxFetchSize(1);
        setWhereClause("staff_id = :0 and passw = :1");
        setWhereClauseParam(0, username);
        setWhereClauseParam(1, password);
        executeQuery();
        RowSet rs = this.getRowSet();
        String userEnabled = new String("N");  // Default setting
        if (rs != null){
          int currentSlot = rs.getCurrentRowSlot();
          Row r = rs.getCurrentRow();
          if (r == null){
             r=rs.first();
             currentSlot = rs.getCurrentRowSlot();
          //check if we found the user
          if (currentSlot == SLOT_VALID){
            Object[] av = r.getAttributeValues();
            LoginUtils.userLoggedIn    = av[0].toString();  // '0' is username
            LoginUtils.userFirstName   = av[1].toString();  // '1' is user first name
            LoginUtils.userAccessLevel = av[6].toString();  // '6' is user level
            LoginUtils.userEnabled     = av[7].toString();  // '7' is user level
            userEnabled = av[7].toString();
        boolean found = (first() != null) & userEnabled.equals("Y");
        setWhereClause(null);
        setWhereClauseParams(null);
        setMaxFetchSize(0);
        return found;
      }It gives the same exception...
    JBO-27122: SQL error during statement preparation. Statement: SELECT Staff.STAFF_ID, Staff.FIRST_NAME, Staff.MIDDLE_NAME, Staff.LAST_NAME, Staff.POSITION, Staff.PASSW, Staff.USER_LEVEL, Staff.ENABLED, Staff.PHONE, Staff.EMAIL FROM STAFF Staff WHERE (Staff.STAFF_ID = :0 and Staff.PASSW = :1)
    This worked in 10.0.1.2 but now it does not work in 10.0.1.3!!!

  • Set and Get parameters using SAP memory.

    I have an ALV grid list that I want to transfer to a detail report when the user doubleclicks.  I have set up a parameter transaction associated with the detail report.  My problem is the transfer does not take place.  After the "CALL TRANSACTION" the ALV grid list refreshes with none of the previous select-options being used.  Is there further setup I need to do, or is my coding incorrect?  All of the parameter fields have valid values.  I am new to ABAP, so please be fairly specific with you answer.
    ALV Grid code:
    form user_command using r_ucomm     like sy-ucomm
                            rs_selfield type slis_selfield.
      case r_ucomm.
        when '&IC1'.
          read table gt_data index rs_selfield-tabindex into gt_data_drilldown.
          set parameter id 'LIF' field gt_data_drilldown-lifnr.
          set parameter id 'BLN' field gt_data_drilldown-belnr.
          set parameter id 'CHK' field gt_data_drilldown-chect.
          set parameter id 'BES' field gt_data_drilldown-ebeln.
          set parameter id 'BSP' field gt_data_drilldown-ebelp.
          set parameter id 'MAT' field gt_data_drilldown-matnr.
          set parameter id 'WRK' field gt_data_drilldown-werks.
          call transaction 'ZRVRAD' and skip first screen.
      endcase.
    endform.   
    Detail report code:
    start-of-selection.
    all fields are in DATA stmts.
      get parameter id 'LIF' field lifnr.
      get parameter id 'BLN' field belnr.
      get parameter id 'CHK' field chect.
      get parameter id 'BES' field ebeln.
      get parameter id 'BSP' field ebelp.
      get parameter id 'MAT' field matnr.
      get parameter id 'WRK' field werks.
    end-of-selection.
      write:/1 sy-vline,
            lifnr under 'Vendor #',
            35 sy-vline,
            belnr under 'Invoice #',
            50 sy-vline,
            chect under 'Cheque #',
            65 sy-vline,
            belnr under 'PO #'.
      uline.
      uline.
      write:/1 sy-vline,
            chect under 'Item #',
            90 sy-vline,
            matnr under 'Material #',
            105 sy-vline,
            werks under 'Plant'
    Thanks in advance for your help - Jim

    Thanks for the replies.
    Problem was resolved with submit report.  Code is below:
    <u>Calling ALV List program:</u>
    FORM user_command USING r_ucomm     LIKE sy-ucomm
                            rs_selfield TYPE slis_selfield.
      CASE r_ucomm.
        WHEN '&IC1'.
          READ TABLE gt_data INDEX rs_selfield-tabindex INTO gt_data_drilldown.
          SET PARAMETER ID 'LIF' FIELD gt_data_drilldown-lifnr.
          SET PARAMETER ID 'BLN' FIELD gt_data_drilldown-belnr.
          SET PARAMETER ID 'CHK' FIELD gt_data_drilldown-chect.
          SET PARAMETER ID 'BES' FIELD gt_data_drilldown-ebeln.
          SET PARAMETER ID 'BSP' FIELD gt_data_drilldown-ebelp.
          SET PARAMETER ID 'MAT' FIELD gt_data_drilldown-matnr.
          SET PARAMETER ID 'WRK' FIELD gt_data_drilldown-werks.
          SUBMIT zco_rpt_vra_detail AND RETURN.
          IF sy-subrc <> 0.
          ENDIF.
      ENDCASE.
    ENDFORM.                    "user_command
    <u>Called program zco_rpt_vra_detail:</u>
    START-OF-SELECTION.
      GET PARAMETER ID 'LIF' FIELD lifnr.
      GET PARAMETER ID 'BLN' FIELD belnr.
      GET PARAMETER ID 'CHK' FIELD chect.
      GET PARAMETER ID 'BES' FIELD ebeln.
      GET PARAMETER ID 'BSP' FIELD ebelp.
      GET PARAMETER ID 'MAT' FIELD matnr.
      GET PARAMETER ID 'WRK' FIELD werks.
    END-OF-SELECTION. 
      WRITE:/1 sy-vline, 'Vendor', 20 sy-vline, 'Vendor #', 35 sy-vline, 'Invoice #',50 sy-vline,
            'Cheque #', 65 sy-vline, 'PO #', 80 sy-vline, 'Item #', 90 sy-vline,
            'Material #', 105 sy-vline, 'Plant'.
      ULINE.
      WRITE: 'MyVendor' UNDER 'Vendor', lifnr UNDER 'Vendor #', belnr UNDER 'Invoice #',
            chect UNDER 'Cheque #', ebeln UNDER 'PO #', ebelp UNDER 'Item #', matnr UNDER 'Material #',
            werks UNDER 'Plant'.

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

Maybe you are looking for