Databinding a gridview with multiple Oracle tables

Hy i'am trying to populate my gridview from multiple tables
this is my QueryString :
SELECT E.ID_AAA,E.ID_ZZZ,E.RRR_DEB,E.III_FIN,E.CODE,P.COD_STR,P.COD_STR_3_CAR,P.LIB_FR,P.LIB_ENG
FROM TR_DSR_HTR_RRR E, TR_DSR_HTR_TTT P
where E.ID_AAA= P.ID_AAA
C# code:
if (OracleQueryString != "") /* the query str*/
OracleCommand cmd = new OracleCommand();
cmd.Connection = conn;
cmd.CommandText = OracleQueryString;
cmd.CommandType = CommandType.Text;
OracleDataReader dr = cmd.ExecuteReader(CommandBehavior.CloseConnection);
if (dr.HasRows)
dt.Load(dr, LoadOption.OverwriteChanges);
GridView1.DataSource = dt;
GridView1.DataBind();
conn.Dispose();
Binding is rendering but i have error out of index at databind
thx

Hy i'am trying to populate my gridview from multiple tables
this is my QueryString :
SELECT E.ID_AAA,E.ID_ZZZ,E.RRR_DEB,E.III_FIN,E.CODE,P.COD_STR,P.COD_STR_3_CAR,P.LIB_FR,P.LIB_ENG
FROM TR_DSR_HTR_RRR E, TR_DSR_HTR_TTT P
where E.ID_AAA= P.ID_AAA
C# code:
if (OracleQueryString != "") /* the query str*/
OracleCommand cmd = new OracleCommand();
cmd.Connection = conn;
cmd.CommandText = OracleQueryString;
cmd.CommandType = CommandType.Text;
OracleDataReader dr = cmd.ExecuteReader(CommandBehavior.CloseConnection);
if (dr.HasRows)
dt.Load(dr, LoadOption.OverwriteChanges);
GridView1.DataSource = dt;
GridView1.DataBind();
conn.Dispose();
Binding is rendering but i have error out of index at databind
thx

Similar Messages

  • From IDOC to Multiple Oracle tables Structure

    Hi Guys,
    I am doing a one Senario which is Custom idoc and Custom Tables of oracle they both have same fields and Same Sturucte does it possible from to do 1:1 mapping shall i process these in 1:n.Need a sugestion in these  How i can slove these problem. IF some from india will give their cont pho to my mail id [email protected] i can call them and dicuss about these problem..
      the senario is idoc to multiple oracle tables..need to map.
    Regd's
    Raj

    Hi Raj,
    you scenario can be:
    R/3 -> XI -> JDBC
    The flow is asynchronous - so you dont have any responses. If you want to use BPM/acknowledgements to catch errors have a look to <a href="/people/udo.martens/blog/2005/09/30/one-logical-system-name-for-serveral-bpm-acknowledgements Logical System Name for serveral BPM Acknowledgements</a>
    You can split the IDoc (<a href="/people/jin.shin/blog/2006/02/07/multi-mapping-without-bpm--yes-it146s-possible without BPM - Yes, it’s possible!</a>) to several JDBC messages or put serveral statements into one message (
    <a href="http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/frameset.htm">Document Formats for the Receiver JDBC Adapter</a>)
    Regards,
    Udo

  • Need to Load data in XML file into multiple Oracle tables

    Experts
    I want to load data that is stored at XML file into multiple Oracle table using plsql.
    I am novice in this area.Kindly explain in depth or step by step so that i can achive this.
    Thanks in advnace.

    Hi,
    extract your xml and then you can use insert all clause.
    here's very small example on 10.2.0.1.0
    SQL> create table table1(id number,val varchar2(10));
    Table created.
    SQL> create table table2(id number,val varchar2(10));
    Table created.
    SQL> insert all
      2  into table1 values(id,val)
      3  into table2 values(id2,val2)
      4  select extractValue(x.col,'/a/id1') id
      5        ,extractValue(x.col,'/a/value') val
      6        ,extractValue(x.col,'/a/value2') val2
      7        ,extractValue(x.col,'/a/id2') id2
      8  from (select xmltype('<a><id1>1</id1><value>a</value><id2>2</id2><value2>b</value2></a>') col from dual) x;
    2 rows created.
    SQL> select * from table1;
            ID VAL                                                                 
             1 a                                                                   
    SQL> select * from table2;
            ID VAL                                                                 
             2 b                                                                    Ants

  • How can build BMM with multiple fact tables

    HI Gurus,
    I have 4 fact tables and 18 Dimension table. Dimension tables have links with multiple fact tables. i have created physical joins in Physical layer. Now my questions is how can i create Business Model with multiple fact tables.
    i mean should i create 4 fact tables as logical tables and logical keys ? Then i have to move all dimension tables in to Business model?
    i am new to OBIEE. i gone through tutorial it is showing with one fact and multi dimension table. Should i do follow same style with multi fact tables.
    Please help me. Thanks in advance for your support.

    Thanks for your response.
    I had drag all tables from the phisical layer to Business Model. then i have deleted all links and recreated complex joins with default values.
    now i have some revenue amont columns in fact tables.
    my question is should i should i create aggregation ( like Sum..) for those columns? is it must ?
    please let me know thank you very much

  • Joins with multiple fact tables

    Hi Experts,
    i have one doubt in joins
    we have two dimensions D1 and D2,
    D1 is having A1 and A2 columns
    D2 is having B1 and B2 columns
    two facts F1 and F2 these are joined like D1 to F1 D1 to F2 and D2 to F1, D2 to F2
    D1----->F1
    D1------>F2
    D2-------->F1
    D2-------->F2
    if i selected A1 and B1 in a request from which FACT table will get the data and why can you please explain
    please help me
    reg,
    Jell

    Hi All,
    I have a similar requirement where I have 4 multiple fact tables and we can't combine all those facts into one single fact table. In that case how can a query work with multiple common and uncommon dimensions and measures from multiple fact tables, if it doesn't work that way - can you please explain how can we expect a query to work with multiple fact tables.
    For eg: D1– Dim
    D2 – Dim
    D3 – Dim
    D4 – Dim
    F1 –Fact
    F2 – Fact
    F3 – Fact
    D1 -> F1
    D2 -> F1,F2
    D3 -> F2
    D4 -> F1, F3
    In this case if we want to query from D1,D2,D3, F1, F2 or D1,D2,D3,D4,F1,F2,F3. Kindly please explain how it can be modeled in BMM or what are the limitations. I have done with two fact tables in past and didn't had issues but this is kind of a vast implementation. Your help is appreciated.

  • Shared cluster with multiple oracle homes

    Hi All,
    I got to build a shared oracle RAC cluster with multiple oracle home installation ( 10g R1 , 10g R2 , and 11g R1 & 2).
    Of course the cluster ware will be version 11.2, but I wondered if there is any dependency on how I install oracle software? Do I have to start with 10g installation first? can I do 11g and then 10g?
    Is there anything I should be aware of ?

    I installed Oracle Application Server Enterprise which includes AS, Database, OID, Web Cache, SSO etc. and OSES on the same machine. Everything works except I think the windows version of OSES and AS need some patches so the crawler isn't working right. Everything does, however, install and run. I think Oracle develops everything in Linux (rumors of them now using Solaris) so on Linux everything should go smoother.

  • Importing data from Microsoft excel file to Oracle Database with Multiple Data Tables. Need expert advice and guidance

    I posted a query on Importing data from Microsoft Excel to Oracle Database (Multiple Data Tables). I got some answer and reference from the forum.
    I presented to my Oracle consultant and representative from Oracle Malaysia. They said impossible. I do not believe what they said. I do believe can be done.
    Can someone help or direct me to an expert that can help me on this

    e90f478a-c529-4c48-b189-51eebeaed477 wrote:
    I posted a query on Importing data from Microsoft Excel to Oracle Database (Multiple Data Tables). I got some answer and reference from the forum.
    I presented to my Oracle consultant and representative from Oracle Malaysia. They said impossible. I do not believe what they said. I do believe can be done.
    Can someone help or direct me to an expert that can help me on this
    We don't know the "query on Importing data from Microsoft Excel to Oracle Database (Multiple Data Tables). "
    We don't know where you posted said query.
    We don't know what "some answer and reference" you received "from the forum."
    We don't know what it was that your "Oracle consultant and representative from Oracle Malaysia" said was "impossible".
    So on what basis are we supposed to "help or direct" to "to an expert that can help "?

  • Can I use APEX directly read/sync with the Oracle Tables ?

    We have a Oracle Database to manage the design data.I am trying to setup a web-based front end using APEX to manage & monitor the parts ordering & logisitics.I want to drive the master data directly from the database without any export or data transfer ? Can I directly read or Link an Oracle tables from APEX application.
    Also,once this is setup,I am looking for setting up some data entry fields to enter Purchasing & Logistics information.Hope I can achieve this using APEX !
    Look forward for the appropriate response.
    Thanks,
    Sham

    Tony,
    Thanks & Appreciate your Quick response.
    Glad that I can use the existing Oracle db schema with APEX.I am not sure if there is any information as how I can connect or link my production schema to the APEX ! I was able to import .csv files & use XL data to create some test databases & play with APEX..but,I did try to go thru most of the instructions & guides to find how to use the production oracle tables,but,could not find anything particular...Please send me a link or material info.
    I suppose I can then use which ever attribute or table data that is required to build the queries ! I am planning to use the production data to build the ordering & logistics application using APEX.Assume I can create new fields & columns for parts that will be ordered & capture/record the purchasing information like Purchase order numbers/Supplier Info/Target Delivery dates etc...
    - Am on very tight schedules to get this application up & running ! Is there any support team or a technical support team that I can call upon if I need any help ?
    Thanks,
    Sham

  • Accessing multiple oracle tables using C#

    Hi you'll.
    I'm a newbie programmer, my first project is to find unmatched records bet two oracle tables.
    One requirements of my project is to write in .net platform. I read a lot of good reviews about using odp.net. I haven't work in any oracle related project.
    Would somebosy enlighten me with this project. Hopefully with codes or threads. Thanks

    If the purpose of your query is to master the fundamentals of using Oracle and .NET, I would recommend visiting the Beginners page on the OTN .NET site:
    http://www.oracle.com/technetwork/topics/dotnet/for-beginners/index.html
    If you have a couple of days to devote to learning, then read the 2 Day .NET book for a comprehensive overview. If not, then you can read the beginner article and/or review the OBE tutorials to learn how to perform different tasks with Oracle and .NET.

  • Issue with multiple Oracle Long Fields

    Hello,
         We have some reports that try to display two Oracle Long data type fields. When we do so we receive the error "ORA-1002 - fetch out of sequence" when we connect the report through "Oracle Server" connection type.
         If I execute SQL Statement of the report in "Oracle SQL Developer" there is no error.
         I have the following components installed on my Windows 7 PC:
          - Crystal Report 2008 (12.3.0.601)
          - Oracle Client 11.1.7.0
        If you want to replicate the issue you can create the following tables:
    create table TEST1_T
      fld1 VARCHAR2(4),
      text   LONG
    create table TEST2_T
      fld1 VARCHAR2(4),
      fld2 VARCHAR2(4),
      text   LONG
    In the TEST1_T table insert data and populate the text field. In the TEST2_T, populate the fld1 to be able to link the 2 tables together you can let the text field blank.
    In the report insert TEST1_T.fld1, TEST2_T.text and TEST1_T.text if you hit preview you should get the error Ora-1002.
    If you need more information let me know.
    Thank you.
    Charles
    P.S: If we connect thru "CR Oracle ODBC Driver 5.3" and the first long field in the SQL statement is null boths fields are blanked in the report but if both fields are populated the report execute correctly.

    Hi,
       This is a known issue with CR that uses Oracle Long Fields.
       See below for direct copy of information from KBase 1205489, hope it helps.
    Symptom
    In Crystal Reports, problems may arise when using more than one Oracle LONG data type field.
    Some of the symptoms you might see:
    Mixed data between two LONG data columns when displayed within the same report.
    Incorrect data displayed in the column which is based on a LONG field.
    Resolution
    Change LONG fields to CLOB fields in the Oracle table.
    Oracle recommends migrating any LONG data to the CLOB type starting in Oracle 9i.
    To make this change, use the TO_LOB method.
    Ken

  • Querying Nested Tables with Multiple other Tables

    I am trying to query columns from a table and it's nested table and do a join to another table.
    SELECT IM.*,
    IMP.PROGRAM_ID,
    S.STAGE_NAME
    FROM TB_ITEM_MASTER IM , TABLE(TB_ITEM_MASTER.PROGRAMS) IMP, TB_STAGE S
    WHERE S.STAGE_ID = IM.STAGE_ID
    AND IM.PROGRAM_ID IN(1,2);
    When running this query I receive the error:
    ORA-00904:"TB_ITEM_MASTER"."PROGRAMS": Invalid Identifier
    I actually copied this query straight from an Oracle Documentation, just replaced my table names with theirs. This query will almost be like a template to me as the program_id field in the Nested table is very cruicial to me. I will joining many tables to TB_ITEM_MASTER and using the where clause against program_id. What's the problem here?
    Please advise.
    ps. Did I mention how much I hate working with this Nested table stuff:(

    You must use the alias name, not the table name.
    SQL> create type employee_obj as object (empno number) ;
      2  /
    Type created.
    SQL> create type employees_nt is table of employee_obj ;
      2  /
    Type created.
    SQL> create table departments (deptno number(2), dname varchar2(20), employees employees_nt)
      2  nested table employees store as employees_table
      3  /
    Table created.
    SQL> insert into departments values (1, 'DEPT #1', employees_nt(employee_obj(2), employee_obj(3))) ;
    1 row created.
    SQL> insert into departments values (22, 'DEPT #2', employees_nt(employee_obj(22), employee_obj(33))) ;
    1 row created.
    SQL>
    SQL> SELECT IM.*,
      2  IMP.empno
      3  FROM departments IM , TABLE(IM.employees) IMP
      4  WHERE IM.deptno IN(1,2);
        DEPTNO DNAME
    EMPLOYEES(EMPNO)
         EMPNO
             1 DEPT #1
    EMPLOYEES_NT(EMPLOYEE_OBJ(2), EMPLOYEE_OBJ(3))
             2
             1 DEPT #1
    EMPLOYEES_NT(EMPLOYEE_OBJ(2), EMPLOYEE_OBJ(3))
             3
    2 rows selected.
    SQL>

  • Smart form problem with multiple pages & table problem

    Hi experts,
    I have a problem with my smart form with multiple pages
    Situation: I have a smart form that ALWAYS has at least 2 pages. In one page the quotation, in the second page (basically this is the 3rd page as the 2nd page is optional) the terms and conditions. Sometimes however, when there are many items in the quotation more than 1 page is needed for the quotation.
    The (optional) second page of a quotation has a different header than the first page of a quotation. So I made a second page with 2 secondary windows (where the header texts are in). The main window is after the secondary windows and has to finish the quotation.
    The problem is that my headers of the second page are never printed, it stays a blank space. The table however does continue and is printed.
    Another problem I have is that I have a table (with the quotations) with 6 columns. The first 2 columns are displayed correctly but once the 3rd column the columns are shown on a lign below.
    Regards,
    PJ

    I would suggest another approach to this problem.
    Use just one page. For the headers on the first page, use a secondary window and on the conditions tab, choose the additional event - Only on First Page.
    For the different header on the second page, create another secondary window on the same page (probably even overlapping the first header on your layout). But in this one, on the conditions tab, choose the additional event - Not on First Page.
    The table should flow as you would be using the Main window for this one.
    As for columns, if they are too wide and wont fit in the same line, it would move to the next line. So you would have to re-adjust the line width and test.
    Hope this resolves your problem.
    Regards,
    Ancy
    Edited by: abapfreak on Oct 4, 2010 11:52 AM

  • NLS_LANG setting for a client with multiple Oracle servers

    Hello!
    We have a web application which has to connect to one of the Oracle servers with different charactersets. When the NLS_LANG on the client is a single byte encoding and the server has a single byte encoding there are no problems. We have now a server with NLS_CHARACTERSET UTF8 and all special (hungarian accented) character are replaced.
    When we set the client to UTF8 the rest of servers does not work.
    What is the solution for one client and multiple servers with different encoding?
    Is there a special key in connection string?
    I tried to change the nls_lang with an alter session statement but without success.
    Regards,
    emeriqus

    NLS_LANG is not depending on the database side, it's a CLIENT setting to "let Oracle know what encoding is used on the CLIENT" so that Oracle can do the conversion from the client encoding to the database (NLS_CHARACTERSET) encoding.
    for ONE application/client the is only ONE correct NLS_LANG value, regardless of the database NLS_CHARACTERSET
    If you web application is really an UTF8 application (check with your vendor) then you can perfectly use a UTF8 client setting and a 8 bit database
    Of course, you will be limited to the database side in this case seen the 8 bit characterset does not know all the characters in UTF8
    The fact that setting the NLS_LANG to UTF8 "does not work" with your web application is simply the fact your application is not a UTF8 env.
    Setting nls_lang to UTF8 will not "magically" make your application UTF8, NLS_LANG is depending on the encoding used in the web server.
    But the first thing to ask yourself is if CURRENT data is correctly in the Oracle database.
    use SQLdeveloper to check the data, this is a "know good client" that needs no NLS configuration.
    You can download it from http://www.oracle.com/technology/products/database/sql_developer/
    If the data is displayed correctly in SQLdeveloper then you are sure it's correct in the database.
    If data is WRONG in the database then that needs to be corrected first, "trying" different client side configurations will only make matter worse (even if they make the data "look good" )
    Regards,
    Gunther
    Client side notes on mentalink:
    Note:158577.1> NLS_LANG Explained (How does Client-Server Character Conversion Work?)
    1.2 What is this NLS_LANG thing anyway?
    3.2 A detailed example of a wrong nls setup to understand what's going on.
    4.2 How can I Check the Client's NLS_LANG Setting?
    5.1 My windows sqlplus is not showing all my extended characters.
    Note:179133.1> The correct NLS_LANG in a Windows Environment
    Note:264157.1> The correct NLS_LANG setting in Unix Environments
    Note:229786.1> NLS_LANG and webservers explained.
    Note 115001.1> NLS_LANG Client Settings and JDBC Drivers
    When using Unicode start here:
    Note:788156.1> AL32UTF8 / UTF8 (Unicode) Database Character Set Implications
    Setting NLs parameters: <Note:241047.1> The Priority of NLS Parameters Explained.

  • Hierarchy with multiple Physical tables

    Some time ago there was a post with this subject and I am in need, if you pls, with the same situation:
    I am looking for Dim (1) - (1:N)-> Dim (3). And Dim (3) - (1:N)-> Fact.
    Suggestion by Mr. Bharath was to, just reduce your snowflake to star in your BMM with Dim (3) as your single LTS. Within the LTS map Dim (1). to Dim (3).
    Could someone pls. help me clarifying the suggestion .../
    a) Should I use the Dim(3) LTS and how to map Dim(1) ? - I believe we should use a column ? right ? Or just Add the Dim(3) in the LTS tables
    Txs. for any hints
    Antonio

    Hi Antonio,
    First of all - try to avoid SNF in BMM.
    http://www.oraclebidwh.com/2010/10/obiee-bmm-layer-design-principalsbest-practices/
    Comments:
    1) You can keep the SNF model in BMM, but if you keep them, then you cannot create an hiearchy with combination of Dim(1) and Dim(3) together as those are two seperate LT.
    2) OBIEE will take the shortest path in forming the query. But, if there are multiple shortest path, then OBIEE will use the latest relationship ID in creating the execution plan. For example: Dim (1) is joined with Dim(3) and Dim(4) and your report pulls - Dim(1) and Fact(1), then the shortest path can be either through DIM(3) or Dim(4), and for such scenario's OBIEE will use the ID (latest ID). Say Dim(4) was the latest join - then OBIEE will use Dim(4) in the query to join with Dim(1).
    3) I actually do not undertstand your issue here - if you are creating an Hiearchy using Dim(1) and Dim(3) together, then why don;t you pull all the fields from Dim(1) into this LT. And in your presentation create folders if you want both the dimensions to be displayed seperately.
    If you are trying to understand and explore OBIEE - then go ahead play with all possible ways you could think off.
    Regards,
    Bharath

  • With multiple Oracle Clients how do you know which one ADO is using

    Currently using Oracle client 8.1.7 to connect to a 10g database with the following connection string.
    Driver={Microsoft ODBC for Oracle}; CONNECTSTRING=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=127.0.0.1)(PORT=10001))(CONNECT_DATA=(SERVICE_NAME=Falcon2))); uid=Falcon;pwd=*******;"
    If I add a second, newer client, how do I tell ADO to use the newer client?
    Thanks,
    Dave

    Go to icloud.com, sign into each of your iCloud accounts and see which one(s) contain your data.

Maybe you are looking for

  • How to insert a image which is in word file in a report ?

    I must place a Logo in a report but the image is in a Office word file. If I had the image as a file , It was be certainly easy I think. What I can do to insert this image in my report ? Regards and Thanks for helps. I work in 6i Oracle Report.

  • Combining several orders in single delivery

    Hi, I want to combine sales orders which have different requested delviery dates. There will not be availability check in the order creation phase. The planning results will not be updated in item schedule lines. Rescheduling will not be run. So is t

  • Desktop for BB 8700

    hi i have downloaded the software for 8700 v4.7 i have downloaded it and when i open it says it says 470_b059_multilanguage.exe is not a valid win32 application pls help

  • Long running BPEL - transaction rollback

    Hi All, I have a bpel process that is taking over 30 minutes to complete. The process reads over 3000 records from database and transforms to EDI. The XSLT transform is taking 95% of the processing time. One option for me is to increase the Session t

  • Isync and upgrade 10.4.9 with Nokia N80

    I have previously synced my N80 without problems, however since this upgrade attempting to open isync gives the message" isync can't open because of a problem with a plug in." "The following plug in doesn't work with this version of isync. Click the