3061 Error related to an parameter query

Hi,
I see I am not the only one encountering the 3061 error, but I would not be surprised I could be the only one not understanding how to solve it..
J
I am using the below function in a module XX (this is curtesy of Mr DbGuy) .
In query X , field B I have the following parameter referring to form C. [Forms]![FRUITS_FORM]![FRUIT_COMBO]
I do not understand how to apply previous suggestion in the below context. All this process is to be triggered from Button XX in Form XX.
Public Function SimpleCSV(strSQL As String, _
            Optional strDelim As String = " OR ") As String
'Returns a comma delimited string of all the records in the SELECT SQL statement
'Source: http://accessmvp.com/thedbguy
'v1.0 - 8/20/2013
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim strCSV As String
Set db = CurrentDb()
Set rs = db.OpenRecordset(strSQL, dbOpenSnapshot)
'Concatenate the first (and should be the only one) field from the SQL statement
With rs
    Do While Not .EOF
        strCSV = strCSV & strDelim & .Fields(0)
        .MoveNext
    Loop
    .Close
End With
'Remove the leading delimiter and return the result
SimpleCSV = Mid$(strCSV, Len(strDelim) + 1)
Set rs = Nothing
Set db = Nothing
End Function

If the SQL statement being passed into the function as a string expression references a query with parameters you won't be able to do that with this function as it stands.  Where it is necessary to establish a recordset object on the basis of a query
with parameters then you must firstly evaluate the parameters by looping though the querydef object's Parameters collection, and then call the OpenRecordset method of the querydef object.  Here's code snippet which illustrates this:
    Dim dbs As DAO.Database
    Dim rst As DAO.Recordset
    Dim qdf As DAO.QueryDef
    Dim prm As DAO.Parameter
    Set dbs = CurrentDb
    Set qdf = dbs.QueryDefs(strQuery)
    For Each prm In qdf.Parameters
        prm = Eval(prm.Name)
    Next prm
    Set rst = qdf.OpenRecordset
However, you have no reference to a querydef object in the code, so you'd need to amend the function to create a temporary querydef object on the basis of the SQL statement, whose parameters you can evaluate as above, and then call its OpenRecordset method.
Ken Sheridan, Stafford, England

Similar Messages

  • No Data Shown because an error occurred while running the query

    Discoverer 10gR2 using Plus on Firefox:
    I have one workbook. The first sheet summarizes by Vendor. Parameters are Type, Category, Vendor (all optional) and mandatory date range.
    The second sheet summarized by Vendor and Model. Parameters are Type, Category, Vendor, Model (all optional) and mandatory date range.
    All parameters except the extra "Model" are shared between the sheets.
    When I run the Vendor sheet, parameters pop up, I put in dates and leave the rest blank. Results display. Yeah!
    When I then run the Model sheet, parameters pop up again (because it has one more parameter). Dates carry forward, leave the rest blank. I get the error No Data Shown because an error occurred while running the query. Refreshing does not help.
    If I click back to the Vendor sheet, then come back to the Model sheet, no parameter screen and the query runs.
    Booooo.
    Have tried multiple DBs, multiple EULs, multiple underlying data sources, replacing the offending parameter with a whole new one, no difference.
    Has any body run into this behavior? Is there an answer?
    -- Ron Olcott, Business Intelligence Product Manager

    What about trying this. On the parameter definition, you have a section on the bottom left of the Parameters window, called "Do you want to allow different parameter values for each worksheet?". When you say in your posting that all but the Model parameter is shared, I assume you mean that you have set this section value to "Allow only one set of paratmeter values for all worksheets". Try setting this to "Allow different parameter values for each worksheet". See if that might make a difference for you. If that works, you may have to leave the option at this, as the lesser of your evils. From my limited experience, the "Allow only one set of parameter mvalues for all worksheets" is a bit flaky in how it works. So I pretty much have gone to always saying to allow different parameter values for each worksheet. Hope this helps a bit. If worse comes to worse, if you have not done so already, log a service request with support and see what they say. Good luck.
    John DIckey

  • 3 range parameter query to Oracle data base from Excel 2000

    A user bas been trying to setup parameter queries into an Oracle
    DB. He normally used MS query and written VBA code to
    modify the query for daily or adhoc updates.
    With Excel 2000, he wanted to take advantage of parameter
    queries linked directly to cells in a spreadsheet.
    He was able to get single or two level parameter queries
    directly linked to the spreadsheet to run, however every time he
    went to a
    three level parameter query it crashed while returning the data
    to Excel.
    The error windows read: Microsoft Excel [Oracle][ODBC] with no
    other details.
    Is there a limit on the number of "levels" for parameter
    queries.
    The user was able to build and see the results of a three level
    query in MS Query, but every time he tried to return the data to
    Excel, it crashed.
    Jeff

    This is an Microsoft Access problem. When you initally connect
    to an ODBC source database Access caches the connection and does
    not ask for connection information on subsequent linked table
    accesses. This causes a problem if you request information from
    tables belonging to different users during the same Access
    session. The way to avoid this error happening is to create a
    user with access privileges to both users being used by the
    Access front end. When you connect to Oracle use the new user
    and you should be able to connect to all the linked tables. It
    may also be worth copying the Access databases to one single
    database and trying the migration that way.
    Regards
    Daniel

  • BO XI R2 WEBI Error(A wrong url parameter has been used to access this page)

    Post Author: Ayyappan Sadhasivam
    CA Forum: Migration to XI R2
    I am working BO XI R2 WEBI Reports, I cannot able to see the sql query of all report, I am getting following error in WEBI report panel Query- HTML
    "A wrong url parameter has been used to access this page" Let me know anybody know the solutions

    Post Author: Ayyappan Sadhasivam
    CA Forum: Migration to XI R2
    I am working BO XI R2 WEBI Reports, I cannot able to see the sql query of all report, I am getting following error in WEBI report panel Query- HTML
    "A wrong url parameter has been used to access this page" Let me know anybody know the solutions

  • Parameter query or cascading combo boxes

    In my Access 2013 web app, I have a form for entering a specific type of  activity.  I am using a related item control to add contacts to each activity.  The main table is Activity, the related Item Control is based on (join table) Assignment.
     So far so good.
    Now on the popup view I need to be able to assign contacts to the activity and I need to filter the choice of contacts based on location and group, so for example, when I open the contact combo box, I see only my volunteers from office 1, or only my staff
    from office 2, etc.  Is this best accomplished by cascading combo boxes? Or should I somehow use a parameter query? I have tried the cascading combo boxes but so far have not been able to get them to work. 
    FYI: In the contacts table, every contact has a location and group. Also, I have one table for location and one for group, so that I can use those in look ups. 
    My join table is: Activity ID (look up to activity table) / Contact (look up to Contact Table) 

    Hi,
    >>
    I need to filter the choice of contacts based on location and group
    Is this best accomplished by cascading combo boxes?
    I have tried the cascading combo boxes but so far have not been able to get them to work.
    <<
    In this case, I will suggest you using the Combo Box control which has the build-in support on cascading feature.
    And what do you mean by “not been able to get them work”? I did a quick test and it worked as expected.
    Regards,
    Jeffrey
    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.

  • Program Error :A required Program parameter couldnot be found

    Hi Guru's ,
    One of my client is getting the error when he is trying to launch the forms.
    Program Error :A required Program parameter couldnot be found
    program EAD$DATE_CHECK_VALUES
    Please suggest...is it related to forms issue or issue with some system parameters?
    I assume the form is looking for some parameter which is not defined....please suggest.
    Versions:
    Application:12.1.3
    DB: 11.2.0.3
    OS: Sun SPARC 5.10
    -Thank you.

    987592 wrote:
    Hi Guru's ,
    One of my client is getting the error when he is trying to launch the forms.
    Program Error :A required Program parameter couldnot be found
    program EAD$DATE_CHECK_VALUES
    Please suggest...is it related to forms issue or issue with some system parameters?
    I assume the form is looking for some parameter which is not defined....please suggest.
    Versions:
    Application:12.1.3
    DB: 11.2.0.3
    OS: Sun SPARC 5.10
    -Thank you.Is the issue with all forms or specific one(s) only? If the latter, is it custom or seeded one?
    Does this happen to all clients or specific one(s)?
    Thanks,
    Hussein

  • LRM-00112: multiple values not allowed for parameter 'query'

    Hello,
    I am getting below error while trying to execute below query...please help:
    exp username/password file=query.dmp log=query.log tables=schema_name.tablename query=\"where PRODUCT_KEY IN\'4541450,4541455,4541475,4541504,
    4541505,4674142,4674201,4674202,4673982,4674000,4674114,4674118,4654432,4715806,4715807,4716122,4716133,4870247,5321008'/"
    LRM-00112: multiple values not allowed for parameter 'query'
    EXP-00019: failed to process parameters, type 'EXP HELP=Y' for help
    EXP-00000: Export terminated unsuccessfully

    yeah i have tried using paranthesis as well...it has given below error then:
    exp schema/password file=query.dmp log=query.log tables=schema_name.table_name query="where PRODUCT_KEY IN (4541450,4541455,4541475,4541504,4
    541505,4674142,4674201,4674202,4673982,4674000,4674114,4674118,4654432,4715806,4715807,4716122,4716133,4870247,5321008)"
    ./export.ksh: syntax error at line 1 : `(' unexpected

  • Error while transporting objects:Internal error during pvc call: Parameter

    Dear all,
    We are facing the following error while transporting the individual configuration objects from our PI development system.
    Export failed: Internal error during pvc call: Parameter versionSpecifier or version has the invalid value null .
    However, it works fine when the complete configuration scenario is transported.
    We tried to transport the objects with different user id's, even then the issue still exists.
    Any inputs to resolve this will be highly helpful.
    Thank you,
    Younus

    Hi Mohammed,
    Answer is inside this oss [Note 1554387 - Error during export from Integration Directory|https://service.sap.com/sap/support/notes/1554387]. In this oss note, solution is to apply a patch (just a patch, not a SP). as it's a litle sap bug...
    Note: your issue is also explained with picture in this one "1550549 - PI transport: Internal error during pvc call" (sorry for this one I cannot insert a link)
    regards
    Mickael
    Edited by: Mickael Huchet on Jan 26, 2012 2:50 PM

  • How to fix an error  (related to work schedule rule) in Time evaluation ?

    Hi experts,
    I am getting an error while running time evaluation - PT60.
    Find the log
    Log:TimeEvaluation                                                                                General data                                                                       
    Schema ZM04 Time Evaluation Without Clock Times
    00753402 Christoudas Natalie
    Customizing error in work schedule rule 1 VM 01 5MTWTF Person rejected: 00753402
    How to fix it? Its urgent.
    Be assured of points for useful answers.
    Rajesh

    Hi All,
    I have checked work schedules and work sc. rules. everything looks fine. Reason being fine, same work schrdule rule, i.e. 5MTWTF is used for other employees, whose payroll area, personnel area, personnel subarea, employee group and employee subgroups are same.
    Why it is throwing error for one employee 753402.
    I am providing you more information. In table V_T569r, if u select recalculation category as time evaluation, it is mentioned as 01.01.2003. Initially, one action called "Conversion take on" has been maintained as on 01.03.2002, where employee had payroll area -99 (payroll irrelevant) and personnel subarea - DAYY.
    Then on 17.03.2008, another action ran "Conversion initial reassignment" where payroll area changed to "MT - monthly", subarea changed to DAYF. At that time PDC recalculation date in infotype 0003 was 01.03.2002 which was before recalculation date, i.e. 01.01.2003.
    Time evaluation was throwing 2 error messages. one was solved by changing PDC recaluation date to 17.03.2008. But other error related to work sc rule 1 VM 01 5MTWTF still occurs. 
    Can some body now provide some useful information?
    Thanks
    Rajesh

  • QAAWS error message "not a valid query"

    Hi,
    When I'm trying to connect to QAAWS I get this error message: "not a valid query. FWB 00025".
    Does anyone know how to solve this problem?
    The server where the BOE is installed on has been restarted a couple of times but it doesn't help.
    Universe Designer and WebI work fine.
    Thanks!

    Is QaaWs running properly on your system?
    To validate the installation, open a browser and type the following URL
    http://[server]:[port]/dswsbobje, where [server] corresponds to
    your web server address and [port] corresponds to the port where you
    set up in your web server. The default used by Tomcat is 8080. dswsbobje
    is the default name of the Web Service provider web application. Then Validate.

  • Running a query in a View Designer results in an error, but running the same query in a Query window works

    Hi everyone,
    Just as my title says, I have a query which I've written in a query window and it works perfectly.
    But when I try to add the query code into the view designer, it throws a Syntax error.
    Error in ON clause near '('.Unable to parse query text.
    Also, when running the query from the view designer (pressing red exclamation mark) I get a different error.
    SQL Execution Error.Executed SQL statement: SELECT Sku, ParentSku, UPC, ...Error Source: .Net SqlClient Data ProviderError Message: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
    Has anyone else experienced this and is there any workaround?
    I have tried to create the view with T-SQL (CREATE VIEW etc.), but when opening it in the view designer I get the error from the 1st image.
    Thank you,
    Radu

    Hi Radu,
    Yes, I have faced similar issue. I had a View and it was working totally fine but when once I opened it in via right click - View Design, it was giving parse error.
    Cause is that Query designer parse and executes the query without error but the way View designer works, it can't parse it.
    Later I ignored View desinger and just used T-SQL like CREATE/ALTER view.
    Workaround is to do right click on View - Script View as - CREATE To/ ATER To.
    Regarding Timeout error, again the issue with View designer which couldn't execute query in there and ended up with timeout error.
    If your SELECT query and SELECT * FROM YourView works fine in Query designer, you are good to go.
    Similar threads:
    View with errors still saved, and still works...
    Parsing error when creating view
    -Vaibhav Chaudhari

  • Error: Load operation failed for query 'GetAuthenticationInfo'. The remote server returned an error: NotFound.

    Hello,
    I have a lightswitch web-application in development, which I need to copy from one computer to the other. I have tried doing it both through Git and by simply copying the solution and opening the project on another machine. The project builds without errors,
    but when I try to debug it, it opens a web-browser, loads to 100% and pops up an error - Load operation failed for query 'GetAuthenticationInfo'. The remote server returned an error: NotFound.
    Now, I have tried repairing Visual Studio on my machine, reinstalling .NET framework and setting  <basicAuthentication enabled="false" /> in web.config, yet it still does not run.
    When using Fiddler, it shows an error while loading the application - "HTTP/1.1 500 Internal Server Error" , which I honestly don't know what it means.
    The application uses ComponentOne and Telerik modules, but they are both installed on both machines. 
    The application does run perfectly on the original machine, but it is not working on any other one.
    Both machines are using Win 8.1 and Visual Studio 2013 Update 4.
    I have tried to look this up online, but most people's problem are when they are deploying the app, not just debugging. I would be really happy for any help with this issue.
    Thanks!

    I have the same problem on one of my development machines. Whenever I create a new project, the System.IdentityModel.Tokens.Jwt nuget package is not referenced properly. The project compiles correctly but you are not able to debug as I get the same error
    as you.
    If you open up your references and there is an error next to any of your references make sure that you correct them. In the case of the jwt reference error, I have to remove the jwt reference and then add it back from the packages folder.
    This may not be your problem but could point you in a direction?

  • Error while executing the workbook query.

    Hi guyz
    i'm getting an error while executing the workbook Query. The actual problem is there is a filter for REQUID in the query definition for removing the doble count. there is customer exit written. the report works fine in DEVELOPMENT but it is not working in quality.
    The query on which this workbook is created is working fine, but the problem is when we execute the workbook i'm facing this issue.
    we re-transported the queries but still we are facing the same problem.
    while we execute the query we are prompted for variable entry(Optional) for date. when we press OK we get the below error
    " NO SID value found for the value REQU_4DQT75Y2RJPVT4PXZ4LHC70V3 of characteristic"
    the request is not available in the BW system. the request was deleted long back, but it is still referring to the same the request id
    could someone please tell me where we went wrong and why we are getting this error.
    Regards,
    Anil Vadde

    Hey ,I think data load to your target on which the query was based had some issue.
    Can you check the data load to the data target.change the status of request concerned to red and delete.do reconstruct if neeed..I think the request had some issue.
    Even you can go to RSRQ or RSMO and filter on the basis of this request and see its status.
    Regards,
    RK

  • RWI 00200 Error while scheduling the Bex Query based Webi report

    Dear All,
    I am facing the below error while scheduling the Bex Query based Webi report.
    Error:RWI 00200
    We are using BO XI 4.0 Sp05.
    Please advise

    Hi,
    I am on BO 4.0 SP05 Patch 6. Webi reports are just showing processing but not giving results. When I try to create new report it is throwing java security error.
    Tried applet patch upgrade(From link : https://websmp207.sap-ag.de/~sapidb/011000358700000902752013E) for webi certificate but didn't help.
    Please suggest what could be done.
    Thanks and Regards,
    Ankit Sharma

  • Error while executing report in query designer

    Dear Folks,
    I am geting following error while executing report in query designer.
    Error:500 E
    an exception raised because of 0analysis pattern.
    Hence,i am unable to execute any report.
    Need help.
    Thanks

    Hi Kitu G,
    I think this is something to do with the bex web 0ANALYSIS* objects not being installed in your BW system.
    I would try and do the following:
    - Goto RSA1 > BI Content > BEx Web Template (BTMP)
    - Then double-click on Select Object.
    - Highlight all objects that start with 0ANALYSIS_PATTERN
    - Click on Transfer Selections, and then Install.
    If you can't do the above in prd, do it in DEV, then transport the objects to prd.
    After all this, try re-running your queries.
    Any questions/clarification just let me know
    Cheers.
    Darwin

Maybe you are looking for