?
Solved

SSRS unnamed parameters error

Posted on 2009-07-09
5
Medium Priority
?
1,593 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 2000 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

WordPress Tutorial 2: Terminology

An important part of learning any new piece of software is understanding the terminology it uses. Thankfully WordPress uses fairly simple names for everything that make it easy to start using the software.

Question has a verified solution.

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

Introduction In the following article I’ll be discussing and demonstrating several different ways of how images can be put on a report. I’m using SQL Server Reporting Services 2008 R2 CTP, more precisely version 10.50.1352.12, but the methods ex…
Windows 7 does not have the best desktop search built in. This is something Windows 7 users have struggled with. You type something in, and your search results don’t always match what you are looking for, or it doesn’t actually work at all. There ar…
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.

762 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