MultipleActiveResultSets=True...where should I put it?

Sorry guys, the code below returns the error  There is already an open DataReader associated with this Command which must be closed first.
Googling I discovered that I should add up MultipleActiveResultSets=True  to my connection.string. But I am wondering how. The error can be because I am calling a view?
Dim mysql As String = "Select customer, perc from testscript"
Dim adoconn As SqlClient.SqlConnection = DirectCast(Dts.Connections("ldnpreportsrv.Control1").AcquireConnection(Dts.Transaction), SqlClient.SqlConnection)
Dim sqlcommand As New SqlClient.SqlCommand(mysql, adoconn)
Dim reader2 As SqlDataReader = sqlcommand.ExecuteReader(CommandBehavior.CloseConnection)
Dim customer As String
Dim percentage As String
Dim message As String
Do While reader2.Read()
customer = reader2("customer").ToString()
percentage = reader2("perc").ToString()
message += "Customer: " & customer & Chr(13) & Chr(10)
message += "Percentage: " & percentage & Chr(13) & Chr(10)
Loop
sqlcommand.ExecuteNonQuery()
adoconn.Close()
Dim button As DialogResult = MessageBox.Show(message, "Cool", MessageBoxButtons.OK)
Dts.TaskResult = ScriptResults.Success

Yes, ArthurZ is correct. ExecuteNonQuery will execute the same command again and discard the resultset, which serves no purpose here.  You get the error because you still have reader2 open on the connection.  Instead, you should close the
data reader.  Replace the ExecuteNonQuery line with:
reader2.Close()
Dan Guzman, SQL Server MVP, http://www.dbdelta.com

Similar Messages

  • Where should I put trustedprincipal.conf in

    Hi experts,
    We have BOE XI 3.1 in our server.
    We configured trusted authentication in CMC of our server machine, and created a trustedprincipal.conf in D:\Program Files\Business Objects\BusinessObjects Enterprise 12.0\win32_x86 of my client machine. I created a jsp file to access bo reports.
    I can not approach http://bfphp:8080/OpenDocument/opendoc/openDocument.jsp, just get alert after running the jsp file.
    However, we put trustedprincipal.conf in our server machine and remove the file from my client machine, I can approach openDocument.jsp after accessing the jsp file.
    Official document says trustedprincipal.conf should be put in client, but we tried it, logon fails. When I put it in server, logon succeeds.
    My question is, if trustedprincipal.conf is put in server, can anyone who knows a user of BO system access to bo system via the jsp file. So how can I control authentication of client who access to BO system, and where should I put trustedprincipal.conf in?

    HI,
    this sounds like a general BusinessObjects Enterprise configuration topic. this forum here is for the Integration Kit for SAP.
    Ingo

  • Where should i put the DEFAULT&SMARTBAR

    Hello,
    where should i put the DEFAULT&SMARTBAR ? and the main Menu ?
    in order to be shown in each form..
    in using Forms 6i.
    Regards,
    Abdetu..

    Hello Gerd,
    Thanks for reply..
    put such things into *a reference form* what is meant by a reference form do u mean the main form?
    Create a property class (PC) for your FORM-MODULE-properties,
    put this PC into the reference form.
    Create there an object group (OG), put the PC into the OG and the inherit the OG to your local form.
    Automatically you have then the PC inherited too.i did all what u mentioned..
    Bbut the problem is that the DEFAULT&SMARTBAR
    can't be seen in allllllllllll my forms in the main menu inspite of i put it into the form module property ->in the intial menu property.
    Regards,
    Abdetu..

  • Where should I put WHENEVER SQLERROR CONTINUE clause?

    Hi all,
    this is my situation:
    I have 2 compiled packages and one compiled procedure which uses the 2 packages. I want to start the procedure with sql*plus.
    To do this, I wrote a script and start the script from sql*plus:
    SQL> @start_proc.sqlThe start_proc.sql script looks like this:
    SET SERVEROUTPUT ON
    SET ECHO OFF
    SET TERMOUT OFF
    WHENEVER SQLERROR CONTINUE
    SPOOL /home/scott/proc_out.txt
    BEGIN
      SCHEMA1.TEST_PR;
      COMMIT;
    END;
    SPOOL OFFThe question is, where should i put the statement WHENEVER SQLERROR CONTINUE ?
    In the current position, the procedure does not start at all. If I remove the statement completely, then I get error on the first record and the procedure does not go on with the rest of the records...

    Thanks for your follow-up, Frank.
    The bigger picture (imo, hence the "-ism") is still:
    When it comes down to error-handling, the world suddenly gets very complicated and turns into all shades of grey, for many years.
    (But actually it should be simple: quit when unexpected things happen)
    The Developer has done his/her best, based on inputs
    The DBA has done his/her best, based on inputs
    The Architect/Designer has done his/her best, based on inputs
    The Manager has done his/her best, based on inputs
    The Client/CST has done his/her best, based on being client/CST
    Funny thing is: whenever I mail/call CST asking for additional input, usually things make sense...
    I dare say: when things go wrong, let them go wrong.
    Propagate the message to another human, who probably didn't think of that/expected it to happen.

  • Where should i put oracle logo in my resume ...

    hie everyone ...
    i just received OCA certification ( 10g DBA ) and SQL Certified Expert ... now where should i put those logos in my resume ... someone mentioned that i can put them in HEADER of my resume ...
    any other advice ??
    thanks in advance for replying this really dumb question ...

    At least you recognize it is a dumb question. That's half the battle. The other half is recognizing that no one really cares about your certifications. Congratulations. You now have the same "certification" that brain dump/cheat sheet users paid for.

  • Where should I put Java Servlet Spec

    Dear all,
    I'm in the process of installing Oracle Application Express Listener where it needs Java Servlet Spec 2.3. I got the Spec downloaded, but I don't know where should I put it. How come it's hard to find documentation about this? Please help....
    Currently I'm using Linux 64.
    Best regards,
    Val

    Oh,
    haha.. I just realized that....
    About System Requirements
    Oracle Application Express Listener system and space requirements are as follows:
          Oracle Database (Enterprise Edition, Standard Edition or Standard Edition One) release 10.2.0.3 or higher, or Oracle Database 10g Release 2 Express Edition or higher.
          Java 6 Update 20 JDK or higher.
          Java Servlet Specification 2.3 or higher.
          Web browser requirements:
              o
                Microsoft Internet Explorer 8.0 or higher.
              o
                Mozilla Firefox 3.0 or higher.
              o
                Google Chrome 2.0 or higher.

  • Where should I put the sevlet

    I just started to work with Tomcat and I compiled the helloWorld sevlet.
    It's said from a book that the sevlet should be placed in serlver_root/webapps/ROOT/WEB-INF/classes, however there isn't a "classes" folder in my WEB-INF folder. So I put the helloWorld sevlet in the WEB-INF folder.
    Then I type http://localhost:8080/servlet/helloworld in my browser, I get a message from the sever said "The requested resource (/servlet/HelloWorld) is not available".
    Could anybody tell me how can solve this prolbem, where should I put the sevelt?

    have ones more a look to your book - especially to information about the configuration file "web.xml" which also should be placed in the WEB-INF folder. This file defines which servlets should be found by the server and which request-URL should be mapped to this servlet.
    for examples concerning the web.xml file see those already defined in your server. copy one and edit it for your needs. if you really want to understand what else might be configured using web.xml see the DTD for this file - it's pretty good documented!
    hope it helps :)

  • Where Should I put the time capsule?

    Where Should I put the time capsule?
    I'm using a wireless modem/router provided by the internet company, and both (the TC and the router) are located next to the pc, in the living room . Using this way, I don't have signal in my bedroom. Should I get a signal amplifier?
    Thanks!

    It would be better to use EOP adapters (homeplug is another name) or ethernet to locate the TC closer to your room.. you can use another apple router to extend the wireless if you need to.

  • Where should I put my code?

    Where should I put my code, on the buttons and other items in question, or in a separate Layer, referencing the items I need...?
    Background :
    I'm REALLY new to Flash with Adobe.  I've used SwishMax a little in the past, but nothing of recent.
    At work there's a project where I'm getting to use FlashPro CS6 and I've run into an odd issue with code to move forwards, backwards, and back to the beggining on 3 different buttons.
    It's in a layer called Actions, and on frame 1 - And remember... uber newbie here folks, so forgive any glaring issues in my code that most people would see quickly...
    //NEXT BUTTON
    NEXT_BUT.addEventListener(MouseEvent.MOUSE_DOWN, nb_mouseDownHandler);
    function nb_mouseDownHandler(event:MouseEvent):void
              this.nextFrame();
    //MAIN MENU BUTTON
    MAINMEN.addEventListener(MouseEvent.MOUSE_DOWN, mm_mouseDownHandler);
    function mm_mouseDownHandler(event:MouseEvent):void
              gotoAndStop(1, "Scene 1");
    //BACK BUTTON
    BACK_BUT.addEventListener(MouseEvent.MOUSE_DOWN, bb_mouseDownHandler);
    function bb_mouseDownHandler(event:MouseEvent):void
         this.prevFrame();
    The code for the first two work's exactly as I need, the code for the back button, initially it only appeared on from the second frame onwards, but during debugging I've popped it on all pages.  On the first frame, it takes you back to a black page with nothing on it, on all others it does absolutely nothing...
    Another question as I've written above, should my code be in a separate layer regerencing the items it needs to affect, or... as a colleague told me in a ridiculously over the top brimming with distaste, create layers for each item, or groups of items and place the code in there...  which to me, see's odd...
    Thanks once again in advance, and I'm sorry to post such a newbie question, but the internet gives mixed anwers, not specific to my situation.
    Tim.

    In AS3 you cannot put code on buttons and other items like you could with AS1 and AS2.  Beyond that, your choices are to place code in the timeline frame(s) or in separate actionscript files.  While there are a number of recommended best practices, what usually works best is whatever you are able to understand and work with at the time.  While there are benefits to having all code located in one place (a frame or a file) since it makes finding it much easier, when you are creating a timeline-based design, that is not always a possible/practical approach.
    Over time you will gain experience with the different approaches and can make the choice based on that experience. 

  • Where should I put JDBC driver for MySQL

    I am trying to connect MySQL with JDBC 2.0 API. I have downloaded the driver file mm.mysql-2.0.4-bin. Where should I put this driver to make it run ?
    According to mysql.org, it says "Put mysql.jar in your classpath". I am confuse by classpath. Is it same as the path ? or is another system variable.
    thanks for clear my doubt. ^_^

    it is a different variable, but also in the same file (autoexec.bat) as path;
    set CLASSPATH=%classpath%;C:\JDK1.3.0_02\bin;c:\path\mm.mysql-2.0.4-bin
    Jamie

  • Where should I put my extended unit test assemblies for Visual Studio 2013?

    Hi, I have a question about M/S Unit test extension.
    1. My purpose
    I'm trying to extend Visual Studio Unit Test.
    The points where I extends unit test is to output detail logs.
    My development environment is as follows.
    OS: Windows 8.1Pro (64bit version)
    IDE: Microsoft Visual Studio Professional 2013
      (Version 12.0.30723.00 Update 3)
    2. Things which I'd like to know
    To enable my test extension, it is required to put my test extension assemblies into designated sub folder under Visual Studio's installed folder.
    The source of this information is MS developers blog below.
    (http://blogs.msdn.com/b/vstsqualitytools/archive/2009/09/04/extending-the-visual-studio-unit-test-type-part-1.aspx)
    Q1. It's required to put the assemblies bellow.
    C:\Program Files\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies
    Howerver, the guidance in the blog is for Visual Studio 2010.
    In Visual Studio2013, above "PrivateAssemblies" could not be found under "\Microsoft Visual Studio 12.0\Common7\IDE" folder.
    Where should I put my assemblies for my 2013. Is there any substitution for "\PrivateAssembly" folder?
    Q2. Another requirement is to set Assembly information entry into the registry below.
    HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\10.0\EnterpriseTools\QualityTools\TestTypes\{13cdc9d9-ddb5-4fa4-a97d-d965ccfc6d4b}\TestTypeExtensions
    For Visual Studio 2013, I could find almost the same node hierarchy, but
    could not find the last "TestTypeExtention" node. Instead,
    I could find "Extensions" node.
    Should I write registry entry here? Or, should I make a new "TestTypeExtension" node and write the entry there?
    Q3.Last question is more basic question.
    Is there any way to kick extended test program in Visual Studio 2013's Test Explore
    without registering my assemblies in the way recommended above.
    I think it's much tender for developer's in debugging phase. For example,
    it is very much helpful, if I could kick a unit test which uses my extended test class in the unit test extension solution.
    That's all. Any information concerning this topics will be appreciated.

    Hi TrailRunner-MF,
    One possible reason is that you didn't view the correct folder, for example, in my windows 8.1 64 bit, it is in the path: "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE", not the "C:\Program Files\Microsoft Visual Studio
    12.0\Common7\IDE " folder.
    Best Regards,
    Jack
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Wher should I put the sIM card

    I do not find where should I put my SIM card

    There is only one place for it to be effective. I guess you didn't read the little leaflet that pointed you to this: 
    http://manuals.info.apple.com/en_US/iPhone_iOS4_User_Guide.pdf

  • Where should a put FCP?

    I have been reading FCP for dummies, watching tutorials and reading the directions before installing the program. Now that I am about to install I remembered reading or hearing to install it in a certain place.
    Should I install the application on my main dirve where the OS and Applications folder is or on a seperate brand new internal drive where I intend to put my video files as I load them from DV tape?
    I was thinking it best to do the later but I want some input. If I should put FCP Studio on the newer seperate drive where do I put it? Do I make a new "applications folder" on this drive or just dump it on there anywhere?
    Thanks for the help.

    Captain,
    Yes, I was taught the same thing about project files. Then I worked for/with some of the folks associated with this group...
    http://www.creativeanimal.nl/files/eng/about.pdf
    http://www.creativeanimal.nl/files/eng/technical.pdf
    They all know what they are doing in a big way, and they were organizing the disks they were traveling from system to system, location to location, in the way I described above. I've working this way for several months without issue. That doesn't mean I won't in the future, though!
    OK, captured material.
    My client showed up with a UVW-1400 deck, when I was told it would be a DVW-A500. I own a AJA IO with 422 control. No such thing on a 1400. There are conversion options that might have worked, but I was on the side of a mountain in the Adirondacks.
    No deck control equals no time code equals you lose your media, you start over.
    Happily, I do travel extra firewire drives with me. I backed up my capture scratch every evening, in addition to the project, etc. I incremented the project name each day so I could avoid duplication - in my capture scratch folder I had incrimented folders repressenting my captures from day 1, day 2, etc.
    I'm going to look into alternative ways of controling 25-pin RS-223C, from my 9-pin controller on IO. I'm not knowledgeable about this.
    Love your story about the Mother's Day Project!
    The project I refered to was a documentary about my son's kindergarten, that some how went from, vhs, imovie, and an imac to eight days of shooting with an xl-1, buying a media drive and learning FCP 1.2.
    It was a difficult day when I learned about the not so nice relationship between Canon DV and FCP.
    It was a difficult day when the project would not open.
    It was a difficult day when the system drive on the imac started to make the funny little sounds just before it ground to a halt.
    No wonder I stepped away until version 4.5!
    Tom

  • For WebLogic 5.1, where should I put my class files for my JavaBeans?

    With JBuilder4, I have built an application with JSP and a few Java Beans (Those JavaBeans are instantiated in those JSP files). There are no EJBs. The package name is called 'onlinetrade'. I have tested the application on JBuilder's web server, it works pretty well.
    Now I am moving this application to WegLogic 5.1. I have encountered a problem with WebLogic 5.1
    and do not know where I should place my JavaBean class files --
    Originally, the JSP files for my application are in package path-- ..onlinetrade\jsp
    and the class files for my beans are in the package path -- ..onlinetrade\jsp\bean\*.class
    Now, with WebLogic 5.1,
    1) I have put my JSP files in
    C:\weblogic\myserver\public_html\onlinetrade\jsp
    2) I have created subdirectory and put my bean class files in
    C:\weblogic\myserver\classfiles\onlinetrade\jsp\bean
    When I started weblogic and the first page - login.jsp page can be up and accessed. But when I login and forward to another JSP page called 'controller.jsp', where a bean is instantiated, I got the following error
    Compilation of 'C:\weblogic\myserver\classfiles\jsp_servlet\_onlinetrade\_jsp\__controller.java' failed:
    C:\weblogic\myserver\classfiles\jsp_servlet\_onlinetrade\_jsp\__controller.java:210: cannot access jsp_servlet._onlinetrade._jsp.registerBean
    probably occurred due to an error in /onlinetrade/jsp/controller.jsp line 53:
    registerBean registerBeanInstance = new registerBean();
    I know the javac is working, and a java file is created upon the JSP page, but the problem is -- the bean class files cannot be found!!!
    Where should I create the package path and put my bean class file so that my JSP pages can pick them up?
    Any help is greatly appreciated!
    Thanks.
    --Tim

    I have mine in WEB-INF/classes

  • Where should I put ADFS at?

    Hi everyone,
    Hope you can help. I have no experience in installing or setting up adfs..but we just need it now for one project that antoher vendor need to access to our AD. I can find some instructions in how to setup adfs...very easy to follow. But I have some questions:
    -Should I put it in DMZ? Or not necessary? 
    - If the above is true, which tcp/udp ports I should open on the firewall?
    - Shoudl I install in on the same box as the DC is?
    - Any other security issue I need to pay attention on?
    Hope you can help and share your experience.
    Thank you!
    Takami

    Hi,
    Microsoft as published several articles about that topic (e.g. http://technet.microsoft.com/en-us/library/dn554245.aspx). I do not want rephrase them here and rather answer your specific questions:
    - Should I put it in DMZ? Or not necessary? 
    In the DMZ you should install an ADFS proxy server (in 2012 R2 called/part of the Web Application Proxy role
    - If the above is true, which tcp/udp ports I should open on the firewall?
    Always publish ADFS over SSL, so port 443 from the Internet to the ADFS proxy server, and from the ADFS proxy server to the ADFS serer is required. Nothing else for inbound traffic. For outbound the servers might need to contact NTP server, Windows Update etc.
    - Shoudl I install in on the same box as the DC is?
    Depends on how big your organization is and on operational constraints. If I am right in Windows 2008 R2 it was not support but working. You might have to reboot the DC then more often because of additional patches coming from MS.
    - Any other security issue I need to pay attention on?
    2048bit SSL certificates, one for the ADFS proxy server(s), one for ADFS server(s). Reduce the number of people being local admins on the ADFS server(s) because these can copy the signing key and that way run their own service from home. The signing key
    can be stored in an HSM (Hardware Security Module) but that is nothing but cheap. 
    Hope that helps,
    Lutz

Maybe you are looking for

  • How  can i Store a file using in a servlet?

    This is because i have a Applet<->Servlet comunication..... With the following application i can store a image in a file in the directory that i indicate..... class rec_image public static void main(String h[]) { Connection con = null; Clob cl; JPane

  • InDesign CS5 hangs when opening files

    I have recently begun experiencing a problem whereby I cannot open any existing InDesign documents. I can create new documents and work in them, but I cannot open any documents previously created in CS5. InDesign CS5, MacBook Pro, Mountain Lion OS 10

  • Error in standby alertlog

    Hi, in10g R2 Unix In stand by alertlog I have : ALTER DATABASE RECOVER    CONTINUE DEFAULT Mon Jun  6 11:02:46 2011 Media Recovery Log /data01/oracle/MYDB/arch01/arcMYDB1_23448_620900925.arc Errors with log /data01/oracle/MYDB/arch01/arcMYDB1_23448_6

  • How to findout a function is using in other components

    Hi I have a package like customer_interface_pack. in this package only one function is there. I need findout this function is calling in different components. Please help me Rgds Ar

  • SUDDENLY the image from LR to psd looks different

    Never before. Do what please? Nothing changed from the previous conversion. Photo>Edit in >smart object in PS. PhotoPRo space left is psd from LR, right is NEF adjusted in LR Mac OSX.8.2