Solved

SSRS unnamed parameters error

Posted on 2009-07-09
5
1,585 Views
Last Modified: 2013-12-06
I am working on a report in SSRS using ISeries data. I can run the query below using unnamed parameters inside the Query Designer but when i preview my report I'm getting the following error (see attachment). If I change the query to use hard coded values instead of parameters it runs fine. Is it an ODBC driver problem? My data I'm trying to send doesn't look too big and I wouldn't think it would run in Query Designer if that was truely an issue.



SELECT   *  FROM         DATADN.EXPENSE
WHERE     (PEMP = ?) AND (PVDATE = ?)

Open in new window

param-error.docx
0
Comment
Question by:farminsure
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 4

Expert Comment

by:LewisPower
ID: 24823718
Hi farminsure,

The unnamed parameters must have a value prior to run the SQL command. Are you sure these parameters have a value ? This sound to be more your problem in my mind than beeing and OBCD issue.

Just remind that your saying it work if it's hard coded value. Usually, ODBC always work or never work... Not alternatively...

Lewis
0
 

Author Comment

by:farminsure
ID: 24824037
I have default values set for all 4 of my parameters. When I preview, the parameters are getting filled in correctly and then the error appears. See attached.

param-error-2.docx
0
 
LVL 35

Accepted Solution

by:
Gary Patterson earned 500 total points
ID: 24824880
This is usually a field size issue.  Make sure the field sizes in your program (especially the four parameter fields) match the database field sizes.  Running an ODBC trace (configure that on the ODBC DSN) might help isolate the problem field.

If you need more help, post the ODBC trace, plus the EXPENSE table layout, including field types and lengths (DSPFFD on the AS/400 output would be great).

- Gary Patterson
0
 

Author Closing Comment

by:farminsure
ID: 31601820
The default value in one of my parameters was 6 chars long and the database field is only 5 chars. Thanks for your help!
0
 
LVL 35

Expert Comment

by:Gary Patterson
ID: 24825478
Happy to help.

- Gary Patterson
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In a recent article here at Experts Exchange (http://www.experts-exchange.com/articles/18880/PaperPort-14-in-Windows-10-A-First-Look.html), I discussed my nine-month sandbox testing of the Windows 10 Technical Preview, specifically with respect to r…
I use more than 1 computer in my office for various reasons. Multiple keyboards and mice take up more than just extra space, they make working a little more complicated. Using one mouse and keyboard for all of my computers makes life easier. This co…
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question