Solved

SSRS unnamed parameters error

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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

Introduction Earlier I wrote an article about the new lookup functions (http://www.experts-exchange.com/A_3433.html) that ship with SQL Server 2008 R2.  In this article I’m going to show you another new feature of SSRS 2008 R2, this time in the vis…
As the title indicates, I have done this before. It chills me everytime I update the OS on my phone, (http://www.experts-exchange.com/articles/18084/Upgrading-to-Android-5-0-Lollipop.html) because one time I did this and I essentially had a bricked …
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

747 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now