Showing posts with label returned. Show all posts
Showing posts with label returned. Show all posts

Thursday, March 22, 2012

check if recordset is empy

Hello,

Using Oracle 8.1.7

In the following package how do I determine whether a value for pROW_ID is returned or not (within the package)?

Merry X-mas,
Ronan van Riet

CREATE OR REPLACE PACKAGE VALIDATE_USER_PKG
AS
PROCEDURE VALIDATEUSER
( pEMAIL_ADDR in S_CONTACT.EMAIL_ADDR%TYPE,
pPWD in S_CONTACT.PWD%TYPE,
pROW_ID out S_CONTACT.ROW_ID%TYPE,
pFST_NAME out S_CONTACT.FST_NAME%TYPE,
pLAST_NAME out S_CONTACT.LAST_NAME%TYPE,
pCOMPANYNAME out S_ORG_EXT.DESC_TEXT%TYPE
);
END VALIDATE_USER_PKG;

/
CREATE OR REPLACE PACKAGE BODY VALIDATE_USER_PKG
AS
PROCEDURE VALIDATEUSER
( pEMAIL_ADDR in S_CONTACT.EMAIL_ADDR%TYPE,
pPWD in S_CONTACT.PWD%TYPE,
pROW_ID out S_CONTACT.ROW_ID%TYPE,
pFST_NAME out S_CONTACT.FST_NAME%TYPE,
pLAST_NAME out S_CONTACT.LAST_NAME%TYPE,
pCOMPANYNAME out S_ORG_EXT.DESC_TEXT%TYPE
)
IS

-- Purpose: Authenticate user with Oracle DB

-- MODIFICATION HISTORY
-- --- -- --------------
-- RVR 03-MAY-2003 Created

BEGIN
SELECT S_CONTACT.ROW_ID, S_CONTACT.FST_NAME, S_CONTACT.LAST_NAME, S_ORG_EXT.DESC_TEXT
INTO pROW_ID, pFST_NAME, pLAST_NAME, pCOMPANYNAME
FROM S_CONTACT, S_ORG_EXT
WHERE S_CONTACT.COMPANYID = S_ORG_EXT.ROW_ID
AND S_CONTACT.EMAIL_ADDR = pEMAIL_ADDR
AND S_CONTACT.PWD = pPWD;

--EXCEPTION
-- WHEN exception_name THEN
-- statements ;
END; -- VALIDATEUSER

END VALIDATE_USER_pkg;handle the execption, such as...

BEGIN
your PL/SQL statement

EXCEPTION
WHEN OTHERS THEN
pRowId := NULL;
END;

IF pRowId IS NULL THEN
trapTheError();
END IF;

Where "trapThe Error()" is the built-in that handles the exception,
or simply handle it thru the exception. Your preference.|||Hi,

Use %FOUND or %NOTFOUND or %ROWCOUNT .|||Originally posted by ronanvanriet
SELECT S_CONTACT.ROW_ID, S_CONTACT.FST_NAME, S_CONTACT.LAST_NAME, S_ORG_EXT.DESC_TEXT
INTO pROW_ID, pFST_NAME, pLAST_NAME, pCOMPANYNAME
FROM S_CONTACT, S_ORG_EXT
WHERE S_CONTACT.COMPANYID = S_ORG_EXT.ROW_ID
AND S_CONTACT.EMAIL_ADDR = pEMAIL_ADDR
AND S_CONTACT.PWD = pPWD;

you should not select directly into variables

use a cursor and
EXIT WHEN cursor_name%NOTFOUND;

Sunday, February 19, 2012

Chart borders not hiding when no data is returned

I do not have much experience with reporting services or Visual Studio.
I'm trying to upgrade some reports from reporting services 2000 to
reporting services 2005. One of the reports I'm working on contains 5
charts. In the 2000 environment when no data is returned for a single
chart, the chart is not displayed and the next chart that contains data
is "moved up" in the display. In 2005 when no data is returned for a
chart, a blank chart (basically an outline) is displayed. So may I end
up seeing a chart or two, then a blank area, and then another chart
instead of seeing all charts that return data displayed sequentially.
I hope that wasn't too confusing and that someone may be able to help
me with this.I want to clear this up a little... bascially I'm getting blank charts
as placeholders in the report. If no data is returned then I do not
want an empty chart /placeholder... instead I want charts with data to
shift up.|||Use an expression on the Visibility --> Hidden property for the chart
and test for rows returned, something like:
=IIF(rownumber("YourQuery") = 0, True, False)
I've also hit this same issue after upgrading reports from RS2000 to
RS2005.
Matt A
Rabbit wrote:
> I want to clear this up a little... bascially I'm getting blank charts
> as placeholders in the report. If no data is returned then I do not
> want an empty chart /placeholder... instead I want charts with data to
> shift up.

Sunday, February 12, 2012

Changing the width of table column based on data returned

I would like to size the width of a table column to be big enough for the
data being returned. I don't seem to be able to use and expression for the
width parameter. How might I dynamically resize the with of table columns?THere is a property of a textbox which will allow its size to grow to fit
the text value... Just check the box...
--
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"Greg Larsen" <GregLarsen@.discussions.microsoft.com> wrote in message
news:D3F216B4-9589-44D6-96F4-4F55DBFB34DE@.microsoft.com...
>I would like to size the width of a table column to be big enough for the
> data being returned. I don't seem to be able to use and expression for
> the
> width parameter. How might I dynamically resize the with of table
> columns?|||Greg,
The only thing I've seen so far in all my playing around is a height
increase/decrease, not a width version. Rightclick the field in question,
and choose properties. On the first tab is "Can increase to accomodate
contents" and "Can decrease to accomodate contents". I don't know why MS
doesn't have a dynamic width increase. Maybe the Dev team didn't put it in
so it wouldn't mess with the column structure.
Catadmin
"Greg Larsen" wrote:
> I would like to size the width of a table column to be big enough for the
> data being returned. I don't seem to be able to use and expression for the
> width parameter. How might I dynamically resize the with of table columns?