Create Recordset (or Datasets?) based on the result of (or the equivalent of) a Pass-through query

Hello
Bit new to Visual Studio, coming across as a VB man used to working with ADO
I've successfully made two Datasets - one pointing to a MySQL database, the other to an Oracle database
Aside from my other problem of not being able to create a tableadapter with a 'Select returning rows' query just yet, what I will need to do is this:
'Select * From {OracleTable} where {OracleTable.ID} Not in {MySQL.ID}'
and have the result returned as something I can read/write/manipulate.
ADO is quite easy in my head. Can anyone help structure the required steps for this in my head? I'm not even sure what to google for at this point
Thanks

It's only that easy (as your SQL statement) if you use linked tables. You can create linked tables in an Access database or SQL Server and then create the join through these tables. It might be easier to use Access in this instance since the database you
are connecting to isn't that important and Access provides a QBE designer.
Another option is to use ADO.NET and LINQ to join the DataTables in your DataSets, although that might be a bit more complicated. You would also need to pull all of the data from both tables, which could be a big problem if the tables contain a lot of data.
If not, it then it may be your best option.
https://msdn.microsoft.com/en-us/library/bb386921.aspx?f=255&MSPPError=-2147217396
I've never experimented with a heterogeneous join between Oracle and MySQL so I don't know whether it would be possible to do it directly.
Paul ~~~~ Microsoft MVP (Visual Basic)

Similar Messages

  • Read the results shown in the trace files

    Hi,
    I have a question,
    In oracle 10g or 11g, How can I interpret the results shown in the trace files?
    ok I explain more ... when I enable the trace sql session , a trace file is created under user dump!
    What 's the meaning of :
    *1- PARSING IN CURSOR*
    *2- tim= is it in Microseconds? Timestamp ? How can I convert it in seconds?*
    *3- STAT*
    *4- CLOSE*
    *5- hv=*
    *6- tim=*
    *7- lid=*
    *8-dep=*
    PARSING IN CURSOR #2 len=104 dep=0 uid=0 oct=2 lid=0 tim=13651992547 hv=3760112805 ad='284c0e6c' sqlid='6shmgvbh1xj55'
    INSERT INTO employee(ID,NAME,department_id, DEPARTMENT_SUB_ID) VALUES(10002, 'employee', 12, 0)
    END OF STMT
    PARSE #2:c=93750,e=102539,p=24,cr=471,cu=0,mis=1,r=0,dep=0,og=1,plh=0,tim=13651992547
    EXEC #2:c=0,e=0,p=5,cr=1,cu=7,mis=0,r=1,dep=0,og=1,plh=0,tim=13651992547
    STAT #2 id=1 cnt=0 pid=0 pos=1 obj=0 op='LOAD TABLE CONVENTIONAL  (cr=1 pr=5 pw=0 time=0 us)'
    CLOSE #2:c=0,e=0,dep=0,type=0,tim=13652013059Thnak you a lot guys,
    Smith

    794130 wrote:
    Thank you,
    Sorry, I am new in Oracle and I want to get things really clear (something that is diifficult I think)
    When an end user submit a query, one user process communicates the query to a server process.
    The server process analyse the syntax and the symentic of the query, this known as the parse process.
    The syntax of the query and the tables, columns are verified against the database buffer cache.
    One PGA is allocated to store the query.
    The server process read from the datafile and gets the results and store it into the shared pool.
    The result is then back to the user process and then to the end user
    Is it correct ?
    Thank you all,
    SSome of the above concepts are close. There is a nice description in the Oracle Database Concepts guide of what happens during the processing of a SQL statement (see the stages listed in the documentation):
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14220/sqlplsql.htm#sthref3460
    It is probably a good idea to distinguish between a hard parse, a soft parse, and a session cursor cache hit:
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14211/glossary.htm#sthref1591
    The database buffer cache is not used to verify the validity of SQL statements, but instead as a means to reduce the number of disk accesses that are required to return a query result to a client computer.
    One or more pieces of PGA memory may be used simultaneously while processing a SQL statement. I have a couple of blog articles that show multiple PGA memory allocations in use at the same time.
    The server process may not need to access a physical data file to return the query results to a client computer, depending of course on the current contents of the buffer cache.
    I recommend that you wait a while before trying to work with 10046 trace files. Right now the contents are probably providing too much detail for you, although I definitely recommend that you return to working with 10046 trace files at a later time. A good starting point is either the free Database Concepts Guide:
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14220.pdf
    or Tom Kyte's "Expert Oracle Database Architecture: Oracle Database Programming 9i, 10g, and 11g Techniques and Solutions, Second Edition" book. You can read my review of that book on Amazon's website:
    http://www.amazon.com/Expert-Oracle-Database-Architecture-Programming/dp/1430229462/ref=dp_ob_title_bk
    Charles Hooper
    Co-author of "Expert Oracle Practices: Oracle Database Administration from the Oak Table"
    http://hoopercharles.wordpress.com/
    IT Manager/Oracle DBA
    K&M Machine-Fabricating, Inc.

  • It is required to get the result set from the last query.

    I need this SP to return the result set from the last query.
    SET QUOTED_IDENTIFIER OFF
    GO
    SET ANSI_NULLS ON
    GO
    alter        proc spQ_GetASCBillingRateIDs2
    @ScheduleID CHAR(15),
    @startdate smalldatetime,
    @enddate smalldatetime
    as
    set nocount on
    truncate table tbltmpgroup
    if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tbltmptbltest]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
    drop table [dbo].[tbltmptbltest]
    exec sp_CreateTblTmpGroup
    insert into tbltmpgroup
    SELECT DISTINCT
    case when pd.billparent = 'N' then org.eligibleorgid
    else isnull(af.parentid, org.eligibleorgid) end as billorgid,
    pd.individualbill , pd.cobrabill, pd.billparent,
    org.eligibleorgid, org.polid, org.orgpolicyid,
    pp.planid,  pp.rateid,
    ps.ascinvoicedate,
    case when ps.ascclaimfromdate > @startdate then ps.ascclaimfromdate
    else @startdate end as premiumrundayFrom,
    case when ps.ascclaimtodate < @enddate then ps.ascclaimtodate
    else @enddate end as premiumrundayTo,
    fts.effdate, fts.termdate,
    case when fts.effdate > @startdate then fts.EffDate
    else @startdate end as ascStartDate,
    case when fts.termdate < @enddate then fts.termdate
    else @enddate end as ascEndDate
    FROM premiumschedule ps (nolock)
    inner join orgpolicy org (nolock)
    on org.ascinvoicerungroup between ps.premiumrundayfrom and ps.premiumrundayto
    inner join FundingTypeStatus fts
    on fts.orgpolicyid = org.orgpolicyid
    and fts.fundtype = 'ASC'
    and ((fts.effdate between @startdate and @enddate)
    or (fts.termdate between @startdate and @enddate)
    or (fts.effdate < @startdate and fts.termdate > @enddate))
    inner join eligibilityorg o (nolock)
    on org.eligibleorgid = o.eligibleorgid
    inner join policydef pd (nolock)
    on pd.polid = org.polid
    inner join policyplans pp (nolock)
    on pp.polid = org.polid
    inner join program p (nolock)
    on pd.programid = p.programid
    left join orgaffiliation af with (nolock)
    on org.eligibleorgid = af.childid
    WHERE ps.premiumscheduleid = @ScheduleID
    AND org.orgpolicyid <> ''
    go
    SELECT DISTINCT z.rateid, e.enrollid, z.ascstartdate, z.ascenddate
    into tbltmptbltest FROM enrollment E (nolock)
    inner join tbltmpgroup z
    on e.rateid = z.rateid
    go
    CREATE UNIQUE CLUSTERED INDEX IDXTempTable  ON tbltmptbltest(enrollid)
    create index IDXTemptableDates on tbltmptbltest(ascstartdate,ascenddate)
    go
    select distinct t.*
    from tbltmpgroup t
    where rateid in (
    select distinct t.rateid from VW_ASC_Billing)
    order by billorgid
    set nocount off
    GO
    SET QUOTED_IDENTIFIER OFF
    GO
    SET ANSI_NULLS ON
    GO

    Please post DDL, so that people do not have to guess what the keys, constraints, Declarative Referential Integrity, data types, etc. in your schema are. Learn how to follow ISO-11179 data element naming conventions and formatting rules (you have no idea).
    Temporal data should use ISO-8601 formats. Code should be in Standard SQL as much as possible and not local dialect. 
    What you did post is bad SQL. 
    The prefix “tbl-” is a design flaw called tibbling and we do not do it. We seldom use temp tables in RDBMS; it is how magnetic tape file programmers fake scratch tapes. 
    If the schema is correct, then SELECT DISTINCT is almost never used. 
    Your “bill_parent” looks like a assembly language bit flag; we never use those flags in SQL. 
    “Funding_Type_Status” is an absurd name for a table. A status is a state of being, not an entity. A type is an attribute property. So this table ought to be column that is either a “funding_type” or “funding_status” (with the time period for the state of being
    shown in other columns). But this hybrid is not possible in a valid data model. 
    Want to try again, with DDL and some specs? 
    --CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
    in Sets / Trees and Hierarchies in SQL

  • I had just put the finishing touches on my 36 minute documentatary when I got an error message that the external 1TB HD I was using to store the project had been ejected improperly (must have shaken a cord).  The result is that the project would not load

    I had just put the finishing touches on my 36 minute documentatary when I got an error message that the external 1TB HD I was using to store the project had been ejected improperly (must have shaken a cord).  The result is that the project would not load in the edit Projects window.  I can see the file in the finder window and it will launch iMovie but the file itself will not load in the projects window.
    I have contacted apple support and they tried to do a few things... to no available.
    With my limited knowledge of file structures I assume that the header file must be corrupt.
    Is there a 3rd party utility that can decompile and fix the file structure so it will load properly.  I've been working on this project since june and would hate to have to redo the whole thing again.

    I had just put the finishing touches on my 36 minute documentatary when I got an error message that the external 1TB HD I was using to store the project had been ejected improperly (must have shaken a cord).  The result is that the project would not load in the edit Projects window.  I can see the file in the finder window and it will launch iMovie but the file itself will not load in the projects window.
    I have contacted apple support and they tried to do a few things... to no available.
    With my limited knowledge of file structures I assume that the header file must be corrupt.
    Is there a 3rd party utility that can decompile and fix the file structure so it will load properly.  I've been working on this project since june and would hate to have to redo the whole thing again.

  • Why is my internet search page gray?  I am able to search a topic, but the 'results' part of the screen is a medium gray color and it won't respond.  Any ideas?

    Why is my internet search page gray?  I am able to search a topic, but the 'results' part of the screen is a medium gray color and it won't respond.  Any ideas?

    Try clearing Safari's cache : Settings > Safari > Clear Cache (and Clear History)
    If that doesn't work then try closing Safari completely and then re-open it : from the home screen (i.e. not with Safari 'open' on-screen) double-click the home button to bring up the taskbar, then press and hold any of the apps on the taskbar for a couple of seconds or so until they start shaking, then press the '-' in the top left of the Safari app to close it, and touch any part of the screen above the taskbar so as to stop the shaking and close the taskbar.
    A third option is a reset : press and hold both the sleep and home buttons for about 10 to 15 seconds (ignore the red slider), after which the Apple logo should appear - you won't lose any content, it's the iPad equivalent of a reboot.

  • What is the result of using the "post tax payable" option in the advance ta

    what is the result of using the "post tax payable" option in the advance tax report - program rfumsv00? I know it will then post the input and output tax to the tax payable GL account. But from point of view of reporting, when you run the advance tax report, will there be any change after doing this posting to tax payable account?

    Basic communication aside, J2EE is mostly a synchronous run-time environment. When asynchrony is introduced, a whole new set of infrastructure requirements is needed to support QoS and commercial-quality implementations. In other words, it's not just about API anymore, it's about reliable communication, exception handling, time outs, etc. You may want to look at this Q&A to see some of the benefits provided by J2EE as underlying run-time for orchestration:
    http://searchwebservices.techtarget.com/ateQuestionNResponse/0,289625,sid26_cid511195_tax292928,00.html
    Doron\
    Download Collaxa 2.0
    http://www.collaxa.com

  • P6 Professional R8.3 - (Cannot move selected items because the result will exceed the limit of WBS tree maximum levels)

    Hi,
    Has anyone encountered this error "Cannot move selected items because the result will exceed the limit of WBS tree maximum levels"?
    Please advise if there's any way around / solution to this. http://s8.postimg.org/bj900spcl/1_error.jpg
    Thanks.

    Thank you so much MichaelRidino!

  • What is the color number in HTML of the result line in the web reports

    Hi guys,
    what is the color number in HTML of the result line in the web reports, its like a yellow, but i m looking for the exactly number color to make some modifications, please

    the same should correspond to a CSS class definition. You execute the report - view source and ideally you should be able to find the class associated with the result cells. You can also go an check out the CSS directly.

  • Report Builder - Trying to find data in a second Dataset based off of two items in the current dataset

    The situation:
    I have two datasets for collecting meter reads. One is for the last Raw read, the other is for the last Billed read. Each table has the reads for machines based on the serial number and meter type. For example:
    Raw - 
    SN: ABC123456
    Read Date: 8/1/14
    Black Impressions: 237
    Color Impressions: 136
    I need to generate a report that has both sets of reads, preferably under the same Meter Type
    Black Impressions
    Serial Number
    Read Date
    Raw Read
    Bill Date
    Bill Read
    I was thinking I could use a Code function to return the Billable Date and Read. But to do so I would have to pass three different items over to the code and I am not sure how to do so. As you will see in a second, I know very little about VB coding, but
    here is along the lines of what I was thinking. 
    Function BillableMeterRead(ByVal metername As Decimal(0), billablemetername as Object(0), billableread As Object(0)) as Decimal
    ct=0
    fct=0
    For Each item As Object In billablemetername
    ct+=1
    If metername=billablemetername Then fct=ct
    Next
    ct=0
    For Each item As Object in billableread
    If ct=fct Then return something
    ct+=1
    Next
    End Function
    So am I close at all?

    Lookup only works in a one to one relationship. That's not what I am trying to do here. Printers have more than one type of page count. There are Black Impressions, Color Impressions, and Page Count (for example). So I want to have a report that shows the
    Billable Pages for an asset (from one dataset) and then the last Raw pages for the same asset (from the second dataset). 
    For example I would want one of the lines to be...
    Serial Number, Last Billed Black Impressions Read Date, Last Billed Black Impressions, Last Raw Black Impressions Read Date, Last Raw Black Impressions, Last Billed Color Impressions Read Date, Last Billed Color Impressions, Last Raw Color Impressions Read
    Date, Last Raw Color Impressions, Last Billed Page Count Read Date, Last Billed Page Count, Last Raw Page Count Read Date, Last Raw Page Count.
    So if I used Lookup like you suggest, it would only return the Black Impressions, since that's the first read typically stored for the device. How do I then get the Color Impressions and the Page Count? I can use LookupSet, but then how do I break the data
    out? How do I lay that data onto the table?

  • Is column visibility based on the first page of the result set or the entire result set?

    I have tried, in vain, to play with the column visibility expression in my report. So where my Business Unit is "MC" or "FM", then I want to display column "HCFA Number"...otherwise hide it. If I run strictly for "MC"
    it works! If I run simply for "CO" it works! And doesn't show! But if I combine "CO" and "MC", it is hidden and I would expect it to be visible since "MC" is part of my entire report.
    Here's the expression I came up with for Column Visibility...
    =IIf((Fields!BUSINESS_UNIT.Value = "MC") OR
    (Fields!BUSINESS_UNIT.Value = "FM"),FALSE,TRUE)
    Am I missing something here or just being dense late on a Friday???
    Thanks for your review and am hopeful for a reply.

    Hi ITBobbyP,
    It seems you have add parameter based on the "Business Unit" which is multiple values and when you select the "CO,MC" the entire column "HCFA Number" is hide, but what you want is to hide the CO related "HCFA Number"
    and show the MC related "HCFA Number", right?
    The expression you are using to show/hide the column visibility will based on the current filtered entire result set. That is mean the entire column "HCFA Number" will be show when the result set contains "MC" or "FM"
    or both, otherwise, it will always hide.
    In your scenario, you can set the row visibility using the expression and you will get the result like below:
    You can set the visibility of the textbox "[HCFANumber]", but the CO related "HCFANumber" will be blank:
    If I have some misunderstanding, please try to provide more details information about the expect result you want.
    Regards,
    Vicky Liu
    Vicky Liu
    TechNet Community Support

  • Can you create a test online and get the results filter in the report tab?

    Im brand new to this software and i had a big concern about it.
    This is a great tool to create surveys and forms to fill out but i was wondering if you can create a quiz.
    By a quiz i mean that instead of sending me back the data the user click in the multiple choice is it
    possible for me to get instead if they got it right or wrong.
    I want to retun if they got it right a boolean variable (true or false)
         logic ex)
         if (answer == true)
             return "correct"
         else
              return" "incorrect"

    Hi;
    You can certainly create a Quiz using FormsCentral but there is nothing built in to "grade" the quiz and no integration with any grading systems like flubaroo.
    You might be able to use "Formulas" on the "View Response" tab to identify correct/incorrect answers. 
    This describes a bit about how to use Formulas (they can be done in a column as well as a row): http://acrobatusers.com/tutorials/how-to-work-with-formulas-in-formscentral
    This is a list of the forumulas available in FormsCentral: http://helpx.adobe.com/acrobat-com/formscentral/help/formula-syntax-built-in-functions.htm l
    Thanks,
    Josh

  • How to send email using pl/sql containing the result set as the msg body

    Hi.. im using Pl/SQL code to send emails to the users from a dataset that is obtained in a databse table. i have used utl_smtp commands to establish the connection with the smtp mail server. im stuck at the logic when i have to include the message body which is actually the result set of a table.. For instance
    IF (p_message = 0) THEN
    UTL_SMTP.write_data(l_mail_conn, 'There is no mismatch between the codes' || UTL_TCP.crlf);
    ELSE
    UTL_SMTP.write_data(l_mail_conn, 'The missing codes are ' || UTL_TCP.crlf);
    for s in (select * from temp)
    loop
    UTL_SMTP.write_data(l_mail_conn, ' ' ||s || UTL_TCP.crlf);
    end loop;
    END IF;
    UTL_SMTP.close_data(l_mail_conn);
    UTL_SMTP.quit(l_mail_conn);
    END;
    ***p_message is a prameter passed to this procedure..
    Can i obtain the result in the form i have it in my table. which has three columns. I want to display the three columns as it is with teh records. ?

    this is not related about this forum but you can use below,
    CREATE OR REPLACE PROCEDURE SEND_MAIL (subject varchar2,mail_from varchar2, mail_to varchar2,mail_msg varchar2)
    IS
    mail_host varchar2(30):='XXXXX';
    mail_conn utl_smtp.connection;
    tz_offset number:=0;
    str varchar2(32000);
    BEGIN
    begin
    select to_number(replace(dbtimezone,':00'))/24 into tz_offset from dual;
    exception
    when others then
    null;
    end;
    mail_conn:=utl_smtp.open_connection(mail_host, 25);
    utl_smtp.helo(mail_conn,mail_host);
    utl_smtp.mail(mail_conn,'[email protected]');
    utl_smtp.rcpt(mail_conn,mail_to);
    utl_smtp.open_data(mail_conn);
    utl_smtp.write_data(mail_conn,'Date: '||to_char(sysdate-tz_offset,'dd mon yy hh24:mi:ss')||utl_tcp.crlf);
    utl_smtp.write_data(mail_conn,'From: '|| mail_from ||utl_tcp.crlf);
    utl_smtp.write_data(mail_conn,'To: "'|| mail_to ||'" <'||mail_to||'>'||utl_tcp.crlf);
    utl_smtp.write_data(mail_conn,'Subject: '||subject||utl_tcp.crlf);
    utl_smtp.write_data(mail_conn,utl_tcp.crlf);
    utl_smtp.write_data(mail_conn,replace_turkish_chars(mail_msg)||utl_tcp.crlf);
    utl_smtp.write_data(mail_conn,utl_tcp.crlf);
    utl_smtp.close_data(mail_conn);
    utl_smtp.quit(mail_conn);
    END;
    Edited by: odilibrary.com on Jun 12, 2012 5:26 PM

  • How to Colour the fields in the Result Set of the query

    Hi all,
    I am having a requirement wher the user want to view the queries results with some colour to the char in the result set.
    suppose customer is the row he want to view some customers with one color and some with different color.
    Is it possible in Bi.
    If so Plz let me know
    Regards

    Hi Priya,
    for the macro thing, you will have to create a workbook and store your query into it, because macros are attached to only workbooks and not queries.
    in the workbook screen (i.e. excel), go to tools --> Macro --> Visual Basic Editor. or simply press Alt + F11. this will take you to macro editor screen.
    you can use code that may look something like below to color the columns, you can also give constant column if they are fixed.
    sub ColorColumns(rngTarget As Range, _
        intColor As Integer)
    Dim c As Long
        With rngTarget
            .Interior.ColorIndex = intColour
            Next c
        End With
    End Sub
    You will find some easy and short snippets for this.
    Regards,
    Purvang

  • How to make the results saved by the save button readable?

    The file is created but the results in the file is not readable... how do i solve this??
    I have 10 JTables in the page which i want to save all the stuffs in the JTable to the file selected by the user, the file is created but when the user opens the file, it is not readable.
    I used vector and i added the JTable into the vector and the results have squares and unreadable symbols....and i use file.log....or file.txt or file.doc the results of the file saved are the same....
    How do i solve this??
    Thanks....

    Hi DMMbeginner,
    the time scale is given by "X0" and "Delta_X". You can easily calc your own time scale from these values (x[i]=x0+i*Delta_X)...
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Process the result so that the dates are ordered by date

    I am retrieving a query result from a sql database of which
    one column contains a string of this format:
    09/08/2008
    How can I process this result so that the dates are ordered
    by date?
    Thanks for anu help :)

    what's your db and version?
    pretty much all dbs have built-in string and date functions,
    a
    combinations of which will let you update your field to be
    date/datetime.
    you will probably want to create a new field in the table to
    store the
    converted dates, then check that they all have been converted
    correctly,
    then delete the current date field and rename the new field
    to the old
    date field's name.
    using your db's string functions you will need to extract
    day, month and
    year parts of your date text, and pass them to your db's date
    creation
    function.
    if your db is MySQL, it has a very handy STR_TO_DATE(str,
    format)
    function... check details in mysql ref manual.
    Azadi Saryev
    Sabai-dee.com
    http://www.sabai-dee.com/

Maybe you are looking for

  • SRM 7.0 - Hide 'Create Memory Snapshot' and 'System Info' buttons in SC

    Dear forum gurus, I have a requirement to hide these 2 fields which appear in the shopping cart wizard in SRM 7.0. The configuration to hide fields only handles header and item fields, and this is a screen field. Presumably this would involve a chang

  • Calendar is creating an extra event when the event spans the week view end of week to beginning of next week.

    When I create an event in Calendar that goes from Saturday to Sunday, like my work shift that starts at 5:30 pm and ends at 3:30 am the next day, the event gets duplicated onto the next day but is seen as a single event. So if I delete the one on Sun

  • Advance payment aging

    Hi All, have you ever heard about advance payment aging ? I'm very confusing about it. In this case, the scenario is as follows: 1. the advance payment is created after PO have made by purchasing user but no GRPO yet. The journal is Dr  advpay Cr. ba

  • Lightroom 3 freezing on mac

    lightroom3 is freezing and slow- this just started. I am on mac 10.6.8. I have a project due this weekend and can't work on it at all right now An y ideas?

  • Firefox timing out and won't reconnect

    I have done some searching on existing posts, and am not sure I have found a solution to my problem. I am a new FIOS customer with land line, Internet and TV service.  I have the MI424WR Router.  All is well except the Internet connection.  I am runn