Urgent - Cannot run sub query from VB 6

Hello!
I'm having a problem with my Oracle OLE DB connection in windows using Visual Basic 6.0 SP3.
I can run normal queries just fine, but a correlated sub query like this:
select A.col_a, (select col_b from Tab_B where id = A.id) from Tab_A A
returns the following error:
"ORA-00907: missing right parenthesis"
But I'm able to run the query witout errors in Toad with the correct result!
So basically, I cannot run a (correlated?) sub query via OLE DB...
What am I doing wrong?? Is it a parameter that I need to set on the connection of command?
I'm not using stored procedures, only plain text SQL.
Very thankful for a quick answer, this is really urgent. If you have the possibility, please e-mail me at:
[email protected]
Thank you in advance.
Best regards,
Bnar Baban

Hi!
I'm running the latest version of Oracle OLE DB...when checking more in detail, it seems that the provider parses the code in a way, that makes the "(select" part of the sub statement be interpreted as a column name....when it does not find a right parenthesis, but a white space, it complains.
I switched to Microsoft MSDAORA provider, and now it works perfectly...
/Bnar

Similar Messages

  • ORA-12856: cannot run parallel query on a loopback connection

    Hi all,
    i need some help , this error is has pop up in alert.log , i just don't know nothing about this loopback connection.
    Can you please guive me some guidance so i can investigate the error (white papers, manuals etc)
    My environment:
    Oracle 11g running on windows 2003 server
    Best Regards
    Rui Madaleno

    ORA-12856: cannot run parallel query on a loopback connection
    Cause: A table or index in a parallel query is referenced via a loopback connection.
    Action: Do not use loopback connection when running a query in parallel.
    A loopback connection is a connection to the server itself,where you are currently logged on. Check your application(s) for such connections in combination with parallel queries. I never saw this error before,maybe you will need help from Oracle support.
    Wernert
    Werner

  • The Java load in database SID / hostname has not been configured yet. You cannot run an installation from the System Copy folder with this load

    Dear Gurus,
    We are facing the below issue when performing a homogeneous system copy of NW 7.0 system using backup/restore method for DB6 system.
    The Java load in database <SID>/<hostname> has not been configured yet. You cannot run an installation from the System Copy folder with this load.
    We went through the SAP Note http://service.sap.com/sap/support/notes/2049842, and followed the same but no luck.
    We updated the Kernel to the latest, but still no luck.
    Request for your quick help as we have to complete it by EOD today.
    Thanks a lot in advance.
    Best Regards,
    Anuj

    Hello Ashutosh ,
    Thanks for your reply.
    We have gone followed the below sequence:
    SCS Installation
    Database Instance Installation using backup/restore method
    CI installation. -> getting error, when we provide the Java Components DVD.
    Best Regards,
    Anuj

  • DBMS_JOB.RUN: cannot run a job from a job

    I'm trying to set up a job to automatically run every October 1st. The "submit" part of this job is pretty simple, but I am getting some errors on the "run" part:
    declare
    job_nbr binary_integer;
    BEGIN
    dbms_job.submit(job => job_nbr,
              what => 'RESET_ORDER_NBR_SEQ;',
              next_date => to_date('10/1/2008', 'mm/dd/yyyy'),
              interval => 'add_months(sysdate,12)');
    dbms_job.run(job_nbr);
    COMMIT;
    END;
    When I run this script, I get the following error: "ORA-32317: cannot run a job from a job". I know this is due to the dbms_job.run because I don't get the error when I comment this line out. Also, even when I moved the dbms_job.run into its own script (and even hard-coded the job_nbr, so the dbms_job.run was the only line in the script), it still gave me the same error. This is working in SQL Developer when but not in Application Express. It seems to be something specific to the "run", since "submit" and "remove" work fine. Has anyone had any problems like this?

    MBETTIS,
    Rather than including dbms_job.run in your PL/SQL block, why don't you just schedule the job to run via next_date?
    Also, the interval will be computed after the job successfully executes. So if your job takes 5 minutes to run, the value of SYSDATE in your interval may "slide" after each execution. Consider using some form of TRUNC against the SYSDATE in your interval if you want to achieve a consistent execution time.
    Joel

  • Running a query from a called form programmatically

    Hi,
    I would like to run a query from a called form using the same criteria as the calling form used, this is my situation;
    I have a form with a field called IDNO when I execute the query I have code in the KEY-EXEQRY that first checks the HOLDER table to see if the IDNO exists if it does, the query will continue as normal and the record will be shown in the form, if it does not exist I have to query another table called DISTRIBUTOR which also has a field called IDNO. I would this to happen without any intervention from the user, in other words the the code that I have will call the second form and must execute the query. This is what I have so far in the KEY-EXEQRY.
    *************************************************************************8
    IF :holder.idno IS NOT NULL THEN
    DECLARE
    v_holder_idno xrays.holder.idno%type;
    v_distr_idno xrays.holder.idno%type;
    CURSOR holder_idno_cursor IS
    SELECT idno
    FROM holder
    WHERE idno LIKE :holder.idno
    ORDER BY idno;
    CURSOR distr_idno_cursor IS
    SELECT idno
    FROM distr
    WHERE idno LIKE :holder.idno
    ORDER BY idno;
    BEGIN
    OPEN holder_idno_cursor;
    FETCH holder_idno_cursor INTO v_holder_idno;
    CLOSE holder_idno_cursor;
    IF v_holder_idno IS NULL THEN
    OPEN distr_idno_cursor;
    FETCH distr_idno_cursor INTO v_distr_idno;
    CLOSE distr_idno_cursor;
    IF v_distr_idno IS NOT NULL THEN
    CALL_FORM('X_DISTRIBUTOR_FORM');
    /* This is where I need to populate the idno of the called form and execute the query and when the program gets back to the calling form the calling form should be in normal mode not query */
    END IF;     
    END IF;     
    END;
    END IF;
    execute_query;
    *************************************************************************************8
    can anyone help me with this problem?
    Thank you
    Michael

    Note something else...
    If the above document is not applicable to 9i then you can find many...many articles if you write on the 'search' utility of OTN 'integrate reports and forms ' .
    Simon

  • Run BW query from R/3, need output file saved on application server

    Hello all,
    We are currently working on BI 7.0. Is there a way where we can run a BW query from R/3 by some program or tcode? We need to run the BW query and use the output of that query as an input to some other custom program in R/3.
    If we can save the output file on application server than the R/3 program will pick up that file from there.
    Is there any standard delivered functionality that will allow us to do that or how can we achieve this.
    Can some help help with some suggestions or links?
    Thanks in advance.

    Hi,
       Refer the following threads:
    [Calling BW Query from R/3;
    [Saving Bex Report / query in BW App server;
    Regards.

  • Running mysqldump query from java code

    Hello,
    I m making a program I want to take a backup of database on a click of a button for which i want to execute this query :
    "mysqldump --user=root --password=root --opt dbname>c:\backup.sql"
    and my code is :
    String command = "cmd /c start";
    String[] env = new String[]{"mysqldump","--user=root", "--password=root",
    "--opt", "njitsurvey", "<", "c:\\backup_db.sql" };
    File dir = new File("C:/Program Files/MySQL/MySQL Server 5.0/bin/");
    Process p1 = Runtime.getRuntime().exec(command, env, dir);
    My problem is my command is running and going in to the directory also but not running my query and i m not getting and error also
    Edited by: purva on Aug 7, 2008 11:56 PM

    You need to print the content of the process error stream ( p1.getErrorStream() ) . It would also be worth you while reading http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html .
    Also, you seem to think that setting the working directory toFile dir = new File("C:/Program Files/MySQL/MySQL Server 5.0/bin/");makes this the directory from which 'mysqldum' is found. It is not. The directory containing the executable has to on the PATH. The working directory is where the process looks for and creates data files if the full path to the files is not provided.
    Edited by: sabre150 on Aug 8, 2008 10:41 AM
    Also, you seem to think that the 'env' is the command executed! It is not. It the set of environment variables. You need to put the whole of the command as the first argument.
    Edited by: sabre150 on Aug 8, 2008 10:46 AM

  • How to avoid or replace a sub query from Exists statement.

    Hello all,
    I have a query regarding sql query.
    DB 1
    Table A                                 Table B
    ID   Code   HeaderID            ID   
    1    100      1                          1
    2    200      1                          2
    3    100      2                          3
    DB 2
    Table C
    ID    Code  Type
    1     100     1
    2     101     1
    3     100     2
    set @HeaderID = 1
    IF EXISTS (SELECT Code From Table A WHERE HeaderID=@ID AND Code  not in (SELECT Code FROM Table C WHERE Type=1))
    BEGIN
    RAISERROR('code is not set.',16,1)
    END
    Table A and Table C are in different databases say DB1 and DB2.
    How can we replace this with another query using join or something. Can we do it using one query by avoiding sub query.I want to get Code 200 which is not match with Table C Code.
    Regards, Ranjith T Rajan Acty System India Pvt Ltd.

    Instead of checking later and raising an error you can create a check constraint on the table so that it raises error when you insert the non existent code itself.
    You can create a UDF like below
    CREATE FUNCTION CheckCodeExistence
    @Code int,
    @HeaderID int
    RETURNS bit
    AS
    BEGIN
    DECLARE @Ret bit
    SELECT @Ret = CASE WHEN NOT EXISTS (SELECT 1
    FROM DB2.dbo.TableC
    WHERE Code = @code
    AND [TYPE] = @headerID)
    THEN 0
    ELSE 1 END
    RETURN(@ret)
    END
    Then create a check constraint on Table A based on it as
    ALTER TABLE TableA ADD CONSTRAINT Chk_TableA CHECK (dbo.CheckCodeExistence(Code,HeaderID) =1 )
    Now when you try to insert record with Code 200 you'll get the below
    Msg 547, Level 16, State 0, Line 1
    The INSERT statement conflicted with the CHECK constraint "Chk_TableA". The conflict occurred in database "DB1", table "dbo.TableA".
    The statement has been terminated.
    See similar example here
    http://visakhm.blogspot.in/2012/05/implementing-multiple-table-based-check.html
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs

  • How to run select query from one SID to fetch record from another SID?

    I have two SID, one is AAA and another is BBB and the connection name is A1 and B1 respectively. I want to run one select query from A1 connection to fetch record B1. Can anyone help me how I can connect from one SID to another SID?

    Hi 869357,
    You can also use the copy command. (Works with limited types)
    try:
    help copyRegards,
    Turloch

  • Cannot run a page from outside the context of an unbounded taskflow

    JDeveloper 11.1.2.1
    I have a JSF page placed on one and only one unbounded taskflow (adfc-config.xml).
    When I want to run that page from the application navigator or from the design editor I got an alert that I have to select a starting activity out of two choices. Both choices point to the same unbounded taskflow. The file adfc-config.xml exists only ones in my application.
    Why JDeveloper offers these choices although the context is set by the only one taskflow ?
    Thanks !
    Edited by: jmenge on May 7, 2012 9:41 AM
    Edited by: jmenge on May 7, 2012 10:53 AM

    cheers that did the trick!! : - )
    I was wondeing if you could help me with one more thing, its about getting rid of an old page after you press a button to go to a new page! this.dispose doesnt wrk below:
            JButton back = new JButton("BACK");
            back.addActionListener(new ActionListener()       
                  public void actionPerformed(ActionEvent e)           
                       VowelmSound s = new VowelmSound();
                        s.setSize(Toolkit.getDefaultToolkit().getScreenSize());
                        s.show();
                        //this.dispose();           
             });        and this is main
    public static void main(String[] args)
    JFrame draw = new punjabidraw();   
    draw.setVisible(true);   
    }I was wondering what I could use to get rid of the old page??
    Kind Regards
    Raj

  • Error in running custom query from jspx(site) for Content Tracker Report

    Hi All,
    I want to generate a custom Content Tracker Report. I am able to do so from Content Tracker console, but when i try to invoke the service 'SCT_GET_DOCUMENT_INFO_ADMIN' or 'SCT_GET_DOCUMENT_INFO' with my custom query(which simply counts the number of rows in a table) from my jspx page, it gives the following error.
    oracle.stellent.wcm.server.request.RequestException: Error
    occurred in Content Server executing service
    'SCT_GET_DOCUMENT_INFO_ADMIN'
    Caused By: oracle.stellent.ridc.protocol.ServiceException: Unable to get
    document info. Unable to execute service method 'sctExecuteQuery'. The
    error was caused by an internally generated issue. The error has been
    logged.
    What could be the reason and the resolution?
    Also, I know that i am invoking the service in the right way as custom report from query as 'select * from users' works fine from site.
    P.S. I am using UCM 11g + SSXA

    Things are turning weird. The below two queries work from jspx.
    1. SELECT * FROM Users
    2. SELECT dname FROM Users
    But, the following query gives error (SQL is correct).
    select dname, count(dname) from users group by dname
    Unable to execute service method 'sctExecuteQuery'. Null pointer is dereferenced.
    $Unable to get document info.!csUnableToExecMethod,sctExecuteQuery!syNullPointerException
    intradoc.common.ServiceException: !$Unable to get document info.!csUnableToExecMethod,sctExecuteQuery
    *ScriptStack SCT_GET_DOCUMENT_INFO_ADMIN
    3:sctExecuteQuery,**no captured values**
    at intradoc.server.ServiceRequestImplementor.buildServiceException(ServiceRequestImplementor.java:2115)
    at intradoc.server.Service.buildServiceException(Service.java:2260)
    at intradoc.server.Service.createServiceExceptionEx(Service.java:2254)
    at intradoc.server.Service.createServiceException(Service.java:2249)
    at intradoc.server.Service.doCodeEx(Service.java:584)
    at intradoc.server.Service.doCode(Service.java:505)
    at intradoc.server.ServiceRequestImplementor.doAction(ServiceRequestImplementor.java:1643)
    at intradoc.server.Service.doAction(Service.java:477)
    at intradoc.server.ServiceRequestImplementor.doActions(ServiceRequestImplementor.java:1458)
    at intradoc.server.Service.doActions(Service.java:472)
    at intradoc.server.ServiceRequestImplementor.executeActions(ServiceRequestImplementor.java:1391)
    at intradoc.server.Service.executeActions(Service.java:458)
    at intradoc.server.ServiceRequestImplementor.doRequest(ServiceRequestImplementor.java:737)
    at intradoc.server.Service.doRequest(Service.java:1890)
    at intradoc.server.ServiceManager.processCommand(ServiceManager.java:435)
    at intradoc.server.IdcServerThread.processRequest(IdcServerThread.java:265)
    at intradoc.server.IdcServerThread.run(IdcServerThread.java:160)
    at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:176)
    Caused by: java.lang.NullPointerException
    at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:768)
    at intradoc.util.IdcConcurrentHashMap.get(IdcConcurrentHashMap.java:60)
    This works fine from Content Tracker UI.
    Anyone has any idea, what could be the issue here?

  • Cannot run the code from local machine - works after deployment!!!

    Hi,
    I am totally new to application server. My problem is that the application code after it is 'deployed' from JDeveloper to Oracle Application Server - it works fine. I can go to the web application from the url and do a 'Submit' of forms and it works fine. The problem comes when I try to connect to dev. environment from local machine and try to do a 'Submit' (done for debugging purposes), I get a 500 Internal Server Error. Is there a configuration file or property I file I have to change? I am clueless.
    Basically addRequest can be considered as the 'Submit'.
    Javax.faces.FacesException: #{newRequestItem.addRequest}: javax.faces.el.EvaluationException: java.lang.IllegalAccessError: tried to access class javax.xml.rpc.FactoryFinder from class javax.xml.rpc.ServiceFactory
    At com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:98)
    My application is built on ADF and JSF and connects to BPEL workflow and DRM. So it is using WebServices.
    Thanks.

    Hi,
    Top further pinpoint the issue, I can make the SSRS report work with the stored procedure by running
    SP_recompile 'myStoredProcedure'
    So, SQL Server has somehow messed up the execution plan for the sproc. But to repeat, executing the Sproc in Management Studio works just fine, I just look the exact sproc and parameters with SQL Profiler when it is not working in SSRS report, then run that
    same sproc manually and it works.
    After extensive debugging, it seems to raise from one specific SELECT row:
    SELECT
    cte.TIMEYEAR + 1 AS TIMEYEAR,
    where cte.TIMEYEAR is varchar. After changing that to
    SELECT
    CAST(cte.TIMEYEAR + 1 AS VARCHAR) AS TIMEYEAR,
    it started to work.
    What will probably remain forever unclear is that WHY the original select always breaks every now and then, and always starts to work with a simple sp_recompile. I could reproduce the error easily by running
    exec sp_msforeachtable @command1="EXEC sp_recompile '?'";
    after which the sproc raised error: "Conversion failed when converting nvarchar value 'Q1/2000' to data type int".
    ..aaaand then just by running SP_recompile 'myStoredProcedure' it again started working fine. I could reproduce this break & fix pair coherently.
    Still it makes no sense from SSRS report perspective, when sproc was broken in Management Studio query, it was always broken from SSRS report end as well, but sometimes when sproc was working from SSMS, it wasn't working from SSRS.

  • Error while running the query from WebI

    A database error occured. The database error test is: The MDX query Select Company code Vendor Fiscal year Cumulative Balance on Rows from 0FIAP failed to execute with the error See RFC trace file or SAP system log for more details. (WIS 10901)
    Any idea why I am getting this error??
    Thank you,
    Raju

    Hi Raju,
    This is a very generic error and occurs in various situation.
    You face this problem with all reports or only one specific report?
    If it is with one report then check to see if you are using proper calculation and formula.
    Check uinverse and parse all conditions.
    If this is happening with all the rerports then check your SP and FP.
    Regards,
    Bashir Awan

  • Cannot run batch directly from Bridge

    Hi,
    I often work from Bridge and use the TOOLS>PHOTOSHOP>BATCH or TOOLS>PHOTOSHOP>LOAD FILES INTO PHOTOSHOP LAYERS
    This works well except it has just stopped working for no apparent reason. When I try any of the commands under TOOLS>PHOTOSHOP, photoshop will launch or become active but then just sit there doing nothing.
    This has thrown a HUGH spanner in my workflow and is driving me nuts.
    I have tried deleting Bridge/photoshop prefs etc but nothing seems to help.
    I'm guessing it has something to do with Bridge startup scripts or something.
    I can batch via the Photoshop Automate menu but this is nowhere as efficient for me - I then have to hunt for the files etc.
    Weird how it did work then not. The only change I made was installing a new version of ACR, but that was a week or so ago.
    PLEASE HELP!!!!!
    Thanks.

    SOLVED!
    I renamed the folder containing my files and it now works. As far as I can tell there was something corrupt in the folder name - it was originally COPY>PASTed from an email, so maybe there was a hidden character or something else weird that confused Photoshop when it tried to run the script.
    Weird.

  • OSB1031: (solaris10) cannot run Test Console from sbconsole

    Hi all,
    when I run the Test Console from sbconsole I got the below error:
    "Error Accessing Test Configuration
    An unexpected error occurred accessing the test service: java.net.UnknownHostException: wasdv1r3n1.dev.b-soiurce.net"
    My OSB domain is a clustered domain with one admin (bnk01osbadm) and 2 managed servers (bnk01osbm01 & bnk01osbm02).
    I checked the log files under the admin (bnk01osbadm.log, bnk01osb.log) and 2 managed servers but I've found no error.
    On the WLS console, under Deployments the column Health is OK for the application named "ALSB Test Framework". I checked also the sbtestservice web application and the status is active.
    What could I check too ? How could I increase the logging level to get more details ?
    Regards
    ferp

    How could I increase the logging level to get more details ?In your OSB domain root there is a file alsbdebug.xml. Change the below to true to get more details logged (Server log severity level should be debug).
    <java:alsb-test-console-debug>false</java:alsb-test-console-debug>
    Manoj

Maybe you are looking for

  • Error -50 when trying to download new Beck album

    Getting err= -50 when trying to download the new Beck album "The Information" Also had multiple issues downloading Toy Story. Anyone know of a fix? Specific error is: There was a problem downloading "Dark Star (Remix by TV On the Radio) / The Informa

  • Why do I have to buy an application twice? Once before the App store and now after the App store has the same application - Aperture

    I have Aperture on my MacPro that was purchased before the App store was born. IT has been updated to the current version now. I also put it on my MacBookPro but it won't accept the same license - says it is invalid license. When I go to the App stor

  • Audit log capacity

    As auditing can be enabled and it keeps the audit logs. Is there a setting for audit retention configuration as well as size configuration. Also how uch space it occupied with average audit capabilities and how much is the growth. This topic not much

  • TS1559 hi, is it software problem or is it a hrdware problem?

    hi, i'm having iPhone 4s 6.1.3 and my wifi is grayed is there any way to fix it , i all ready try to do all the steps in the article above with no success can you please help? thx Ofir  

  • Numeric pointers on the FM extract.

    I know that there is no option for 'numeric pointers' on a delta type if the extraction is by FM. Is there anyway i can change this at a table level. I really need this option due to 'timestamps' and 'calendar day' not be,ing effecient for this extra