Solved

SSRS unnamed parameters error

Posted on 2009-07-09
5
1,574 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
  • 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 34

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 34

Expert Comment

by:Gary Patterson
ID: 24825478
Happy to help.

- Gary Patterson
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

A recent questions about how to add SSRS named instances, couldn't find any that talks about SQL server 2008, anyway I decided to help by creating some screen shots. The installation is straightforward, you just pop the SQL server 2008 installati…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
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.

785 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